Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a8c7e97d
Commit
a8c7e97d
authored
Sep 24, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed to_object for NULL IDispatch.
parent
1a6aa963
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
jsutils.c
dlls/jscript/jsutils.c
+12
-2
lang.js
dlls/jscript/tests/lang.js
+5
-0
No files found.
dlls/jscript/jsutils.c
View file @
a8c7e97d
...
...
@@ -603,8 +603,18 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
*
disp
=
(
IDispatch
*
)
_IDispatchEx_
(
dispex
);
break
;
case
VT_DISPATCH
:
IDispatch_AddRef
(
V_DISPATCH
(
v
));
*
disp
=
V_DISPATCH
(
v
);
if
(
V_DISPATCH
(
v
))
{
IDispatch_AddRef
(
V_DISPATCH
(
v
));
*
disp
=
V_DISPATCH
(
v
);
}
else
{
DispatchEx
*
obj
;
hres
=
create_object
(
ctx
,
NULL
,
&
obj
);
if
(
FAILED
(
hres
))
return
hres
;
*
disp
=
(
IDispatch
*
)
_IDispatchEx_
(
obj
);
}
break
;
case
VT_BOOL
:
hres
=
create_bool
(
ctx
,
V_BOOL
(
v
),
&
dispex
);
...
...
dlls/jscript/tests/lang.js
View file @
a8c7e97d
...
...
@@ -948,6 +948,11 @@ ok(!nullDisp === true, "!nullDisp = " + !nullDisp);
ok
(
String
(
nullDisp
)
===
"null"
,
"String(nullDisp) = "
+
String
(
nullDisp
));
ok
(
nullDisp
!=
new
Object
(),
"nullDisp == new Object()"
);
ok
(
new
Object
()
!=
nullDisp
,
"new Object() == nullDisp"
);
ok
((
typeof
Object
(
nullDisp
))
===
"object"
,
"typeof Object(nullDisp) !== 'object'"
);
tmp
=
getVT
(
Object
(
nullDisp
));
ok
(
tmp
===
"VT_DISPATCH"
,
"getVT(Object(nullDisp) = "
+
tmp
);
tmp
=
Object
(
nullDisp
).
toString
();
ok
(
tmp
===
"[object Object]"
,
"Object(nullDisp).toString() = "
+
tmp
);
function
do_test
()
{}
function
nosemicolon
()
{}
nosemicolon
();
...
...
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