Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
956cb343
Commit
956cb343
authored
Nov 30, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 30, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Cut arguments circular reference after returning from the function.
parent
d9d8c8b7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
function.c
dlls/jscript/function.c
+15
-5
No files found.
dlls/jscript/function.c
View file @
956cb343
...
@@ -221,14 +221,17 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
...
@@ -221,14 +221,17 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
}
}
hres
=
jsdisp_propput
(
var_disp
,
argumentsW
,
PROPF_DONTDELETE
,
jsval_obj
(
arg_disp
));
hres
=
jsdisp_propput
(
var_disp
,
argumentsW
,
PROPF_DONTDELETE
,
jsval_obj
(
arg_disp
));
if
(
SUCCEEDED
(
hres
))
{
if
(
FAILED
(
hres
))
{
jsdisp_release
(
arg_disp
);
jsdisp_release
(
var_disp
);
return
hres
;
}
hres
=
scope_push
(
function
->
scope_chain
,
var_disp
,
to_disp
(
var_disp
),
&
scope
);
hres
=
scope_push
(
function
->
scope_chain
,
var_disp
,
to_disp
(
var_disp
),
&
scope
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
hres
=
create_exec_ctx
(
ctx
,
this_obj
,
var_disp
,
scope
,
FALSE
,
&
exec_ctx
);
hres
=
create_exec_ctx
(
ctx
,
this_obj
,
var_disp
,
scope
,
FALSE
,
&
exec_ctx
);
scope_release
(
scope
);
scope_release
(
scope
);
}
}
jsdisp_release
(
var_disp
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
jsdisp_t
*
prev_args
;
jsdisp_t
*
prev_args
;
...
@@ -236,10 +239,17 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
...
@@ -236,10 +239,17 @@ static HRESULT invoke_source(script_ctx_t *ctx, FunctionInstance *function, IDis
function
->
arguments
=
arg_disp
;
function
->
arguments
=
arg_disp
;
hres
=
exec_source
(
exec_ctx
,
function
->
code
,
function
->
func_code
,
FALSE
,
r
);
hres
=
exec_source
(
exec_ctx
,
function
->
code
,
function
->
func_code
,
FALSE
,
r
);
function
->
arguments
=
prev_args
;
function
->
arguments
=
prev_args
;
exec_release
(
exec_ctx
);
}
}
}
/* Reset arguments value to cut the reference cycle. Note that since all activation contexts have
* their own arguments property, it's impossible to use prototype's one during name lookup */
jsdisp_propput_name
(
var_disp
,
argumentsW
,
jsval_undefined
());
jsdisp_release
(
arg_disp
);
jsdisp_release
(
arg_disp
);
exec_release
(
exec_ctx
);
jsdisp_release
(
var_disp
);
return
hres
;
return
hres
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment