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
37c2d43e
Commit
37c2d43e
authored
Sep 23, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Allow this_obj to be host object in call_function.
parent
f8c2b42d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
function.c
dlls/jscript/function.c
+4
-10
run.c
dlls/jscript/tests/run.c
+4
-0
No files found.
dlls/jscript/function.c
View file @
37c2d43e
...
...
@@ -281,21 +281,15 @@ static HRESULT call_function(script_ctx_t *ctx, FunctionInstance *function, IDis
HRESULT
hres
;
if
(
function
->
value_proc
)
{
DispatchEx
*
jsthis
=
NULL
;
vdisp_t
vthis
;
if
(
this_obj
)
{
jsthis
=
iface_to_jsdisp
((
IUnknown
*
)
this_obj
);
if
(
!
jsthis
)
FIXME
(
"this_obj is not DispatchEx
\n
"
);
}
if
(
this_obj
)
set_disp
(
&
vthis
,
this_obj
);
else
set_jsdisp
(
&
vthis
,
ctx
->
script_disp
);
set_jsdisp
(
&
vthis
,
jsthis
?
jsthis
:
ctx
->
script_disp
);
hres
=
function
->
value_proc
(
ctx
,
&
vthis
,
DISPATCH_METHOD
,
args
,
retv
,
ei
,
caller
);
vdisp_release
(
&
vthis
);
if
(
jsthis
)
jsdisp_release
(
jsthis
);
}
else
{
hres
=
invoke_source
(
ctx
,
function
,
this_obj
?
this_obj
:
(
IDispatch
*
)
_IDispatchEx_
(
ctx
->
script_disp
),
args
,
retv
,
ei
,
caller
);
...
...
dlls/jscript/tests/run.c
View file @
37c2d43e
...
...
@@ -912,6 +912,10 @@ static void run_tests(void)
parse_script_a
(
"ok(String(testObj) === '1', 'wrong testObj value');"
);
CHECK_CALLED
(
testobj_value
);
SET_EXPECT
(
testobj_value
);
parse_script_a
(
"ok(String.prototype.concat.call(testObj, ' OK') === '1 OK', 'wrong concat result');"
);
CHECK_CALLED
(
testobj_value
);
run_from_res
(
"lang.js"
);
run_from_res
(
"api.js"
);
run_from_res
(
"regexp.js"
);
...
...
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