Commit aa18bbed authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

jscript: Don't addref before calling jsdisp_propput_name.

It already increases refcount. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent 736eb107
......@@ -758,7 +758,7 @@ static HRESULT detach_scope(script_ctx_t *ctx, call_frame_t *frame, scope_chain_
if (scope == frame->base_scope && func->name && func->local_ref == INVALID_LOCAL_REF &&
ctx->version >= SCRIPTLANGUAGEVERSION_ES5)
jsdisp_propput_name(jsobj, func->name, jsval_obj(jsdisp_addref(frame->function_instance)));
jsdisp_propput_name(jsobj, func->name, jsval_obj(frame->function_instance));
index = scope->scope_index;
for(i = 0; i < frame->function->local_scopes[index].locals_cnt; i++)
......
......@@ -390,7 +390,7 @@ static HRESULT create_match_array(script_ctx_t *ctx, jsstr_t *input_str,
if(FAILED(hres))
break;
hres = jsdisp_propput_name(array, L"input", jsval_string(jsstr_addref(input_str)));
hres = jsdisp_propput_name(array, L"input", jsval_string(input_str));
if(FAILED(hres))
break;
......
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