Commit ad8917c6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Store safety options only in script context.

parent 271819e7
...@@ -51,7 +51,6 @@ struct VBScript { ...@@ -51,7 +51,6 @@ struct VBScript {
LONG ref; LONG ref;
DWORD safeopt;
SCRIPTSTATE state; SCRIPTSTATE state;
IActiveScriptSite *site; IActiveScriptSite *site;
script_ctx_t *ctx; script_ctx_t *ctx;
...@@ -752,7 +751,6 @@ static HRESULT WINAPI VBScriptParse_InitNew(IActiveScriptParse *iface) ...@@ -752,7 +751,6 @@ static HRESULT WINAPI VBScriptParse_InitNew(IActiveScriptParse *iface)
return E_UNEXPECTED; return E_UNEXPECTED;
This->is_initialized = TRUE; This->is_initialized = TRUE;
This->ctx->safeopt = This->safeopt;
return This->site ? set_ctx_site(This) : S_OK; return This->site ? set_ctx_site(This) : S_OK;
} }
...@@ -914,7 +912,7 @@ static HRESULT WINAPI VBScriptSafety_GetInterfaceSafetyOptions(IObjectSafety *if ...@@ -914,7 +912,7 @@ static HRESULT WINAPI VBScriptSafety_GetInterfaceSafetyOptions(IObjectSafety *if
return E_POINTER; return E_POINTER;
*pdwSupportedOptions = SUPPORTED_OPTIONS; *pdwSupportedOptions = SUPPORTED_OPTIONS;
*pdwEnabledOptions = This->safeopt; *pdwEnabledOptions = This->ctx->safeopt;
return S_OK; return S_OK;
} }
...@@ -928,7 +926,7 @@ static HRESULT WINAPI VBScriptSafety_SetInterfaceSafetyOptions(IObjectSafety *if ...@@ -928,7 +926,7 @@ static HRESULT WINAPI VBScriptSafety_SetInterfaceSafetyOptions(IObjectSafety *if
if(dwOptionSetMask & ~SUPPORTED_OPTIONS) if(dwOptionSetMask & ~SUPPORTED_OPTIONS)
return E_FAIL; return E_FAIL;
This->safeopt = (dwEnabledOptions & dwOptionSetMask) | (This->safeopt & ~dwOptionSetMask) | INTERFACE_USES_DISPEX; This->ctx->safeopt = (dwEnabledOptions & dwOptionSetMask) | (This->ctx->safeopt & ~dwOptionSetMask) | INTERFACE_USES_DISPEX;
return S_OK; return S_OK;
} }
...@@ -960,7 +958,6 @@ HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pU ...@@ -960,7 +958,6 @@ HRESULT WINAPI VBScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pU
ret->ref = 1; ret->ref = 1;
ret->state = SCRIPTSTATE_UNINITIALIZED; ret->state = SCRIPTSTATE_UNINITIALIZED;
ret->safeopt = INTERFACE_USES_DISPEX;
ctx = ret->ctx = heap_alloc_zero(sizeof(*ctx)); ctx = ret->ctx = heap_alloc_zero(sizeof(*ctx));
if(!ctx) { if(!ctx) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment