forked from Mirrors/wine-wine
vbscript: Retrieve the vbscode context from the named item directly.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
aaa625217b
commit
408a912f93
|
@ -1867,8 +1867,6 @@ void release_vbscode(vbscode_t *code)
|
|||
for(i=0; i < code->bstr_cnt; i++)
|
||||
SysFreeString(code->bstr_pool[i]);
|
||||
|
||||
if(code->context)
|
||||
IDispatch_Release(code->context);
|
||||
if(code->named_item)
|
||||
release_named_item(code->named_item);
|
||||
heap_pool_free(&code->heap);
|
||||
|
@ -2016,9 +2014,6 @@ HRESULT compile_script(script_ctx_t *script, const WCHAR *src, const WCHAR *item
|
|||
ctx.code = NULL;
|
||||
release_compiler(&ctx);
|
||||
|
||||
if(item && item->disp)
|
||||
IDispatch_AddRef(code->context = item->disp);
|
||||
|
||||
list_add_tail(&script->code_list, &code->entry);
|
||||
*ret = code;
|
||||
return S_OK;
|
||||
|
|
|
@ -181,11 +181,11 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
|
|||
}
|
||||
}
|
||||
|
||||
if(ctx->func->code_ctx->context) {
|
||||
hres = disp_get_id(ctx->func->code_ctx->context, name, invoke_type, TRUE, &id);
|
||||
if(ctx->func->code_ctx->named_item && ctx->func->code_ctx->named_item->disp) {
|
||||
hres = disp_get_id(ctx->func->code_ctx->named_item->disp, name, invoke_type, TRUE, &id);
|
||||
if(SUCCEEDED(hres)) {
|
||||
ref->type = REF_DISP;
|
||||
ref->u.d.disp = ctx->func->code_ctx->context;
|
||||
ref->u.d.disp = ctx->func->code_ctx->named_item->disp;
|
||||
ref->u.d.id = id;
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -348,7 +348,6 @@ struct _vbscode_t {
|
|||
BOOL pending_exec;
|
||||
BOOL is_persistent;
|
||||
function_t main_code;
|
||||
IDispatch *context;
|
||||
named_item_t *named_item;
|
||||
|
||||
BSTR *bstr_pool;
|
||||
|
|
Loading…
Reference in New Issue