jscript: Don't addref before calling jsdisp_propput_name.

It already increases refcount.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2023-11-03 20:47:59 +02:00 committed by Alexandre Julliard
parent 736eb10748
commit aa18bbedea
2 changed files with 2 additions and 2 deletions

View file

@ -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++)

View file

@ -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;