jscript: Code clean up.

This commit is contained in:
Jacek Caban 2009-09-01 13:26:08 +02:00 committed by Alexandre Julliard
parent ee60e5fd71
commit c444a4907e
5 changed files with 12 additions and 12 deletions

View File

@ -924,7 +924,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Dis
hres = create_builtin_function(ctx, ArrayConstr_value, NULL, PROPF_CONSTR, &array->dispex, ret);
IDispatchEx_Release(_IDispatchEx_(&array->dispex));
jsdisp_release(&array->dispex);
return hres;
}

View File

@ -788,7 +788,7 @@ HRESULT init_dispex_from_constr(DispatchEx *dispex, script_ctx_t *ctx, const bui
hres = init_dispex(dispex, ctx, builtin_info, prot);
if(prot)
IDispatchEx_Release(_IDispatchEx_(prot));
jsdisp_release(prot);
return hres;
}
@ -871,7 +871,7 @@ HRESULT disp_call(IDispatch *disp, DISPID id, LCID lcid, WORD flags, DISPPARAMS
jsdisp = iface_to_jsdisp((IUnknown*)disp);
if(jsdisp) {
hres = jsdisp_call(jsdisp, id, lcid, flags, dp, retv, ei, caller);
IDispatchEx_Release(_IDispatchEx_(jsdisp));
jsdisp_release(jsdisp);
return hres;
}
@ -940,7 +940,7 @@ HRESULT disp_propput(IDispatch *disp, DISPID id, LCID lcid, VARIANT *val, jsexce
else
hres = DISP_E_MEMBERNOTFOUND;
IDispatchEx_Release(_IDispatchEx_(jsdisp));
jsdisp_release(jsdisp);
return hres;
}
@ -1010,7 +1010,7 @@ HRESULT disp_propget(IDispatch *disp, DISPID id, LCID lcid, VARIANT *val, jsexce
jsdisp = iface_to_jsdisp((IUnknown*)disp);
if(jsdisp) {
hres = jsdisp_propget(jsdisp, id, lcid, val, ei, caller);
IDispatchEx_Release(_IDispatchEx_(jsdisp));
jsdisp_release(jsdisp);
return hres;
}

View File

@ -174,7 +174,7 @@ void scope_release(scope_chain_t *scope)
if(scope->next)
scope_release(scope->next);
IDispatchEx_Release(_IDispatchEx_(scope->obj));
jsdisp_release(scope->obj);
heap_free(scope);
}
@ -211,7 +211,7 @@ void exec_release(exec_ctx_t *ctx)
if(ctx->scope_chain)
scope_release(ctx->scope_chain);
if(ctx->var_disp)
IDispatchEx_Release(_IDispatchEx_(ctx->var_disp));
jsdisp_release(ctx->var_disp);
if(ctx->this_obj)
IDispatch_Release(ctx->this_obj);
heap_free(ctx);

View File

@ -268,7 +268,7 @@ static HRESULT error_constr(DispatchEx *dispex, WORD flags, DISPPARAMS *dp,
V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(err);
}
else
IDispatchEx_Release(_IDispatchEx_(err));
jsdisp_release(err);
return S_OK;
@ -367,7 +367,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
V_VT(&v) = VT_BSTR;
V_BSTR(&v) = SysAllocString(names[i]);
if(!V_BSTR(&v)) {
IDispatchEx_Release(_IDispatchEx_(&err->dispex));
jsdisp_release(&err->dispex);
return E_OUTOFMEMORY;
}
@ -377,7 +377,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
hres = create_builtin_function(ctx, constr_val[i], NULL,
PROPF_CONSTR, &err->dispex, constr_addr[i]);
IDispatchEx_Release(_IDispatchEx_(&err->dispex));
jsdisp_release(&err->dispex);
VariantClear(&v);
if(FAILED(hres))
return hres;

View File

@ -361,12 +361,12 @@ static HRESULT WINAPI JScript_Close(IActiveScript *iface)
change_state(This, SCRIPTSTATE_CLOSED);
if(This->ctx->script_disp) {
IDispatchEx_Release(_IDispatchEx_(This->ctx->script_disp));
jsdisp_release(This->ctx->script_disp);
This->ctx->script_disp = NULL;
}
if(This->ctx->global) {
IDispatchEx_Release(_IDispatchEx_(This->ctx->global));
jsdisp_release(This->ctx->global);
This->ctx->global = NULL;
}
}