mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
jscript: Fixed to_primitive for null dispatch.
This commit is contained in:
parent
3e1430e0e4
commit
e7f2754c32
2 changed files with 6 additions and 0 deletions
|
@ -198,6 +198,11 @@ HRESULT to_primitive(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, VARIANT *ret
|
|||
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
|
||||
static const WCHAR valueOfW[] = {'v','a','l','u','e','O','f',0};
|
||||
|
||||
if(!V_DISPATCH(v)) {
|
||||
V_VT(ret) = VT_NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
jsdisp = iface_to_jsdisp((IUnknown*)V_DISPATCH(v));
|
||||
if(!jsdisp) {
|
||||
V_VT(ret) = VT_EMPTY;
|
||||
|
|
|
@ -942,6 +942,7 @@ ok(nullDisp == null, "nullDisp == null");
|
|||
ok(getVT(true && nullDisp) === "VT_DISPATCH",
|
||||
"getVT(0 && nullDisp) = " + getVT(true && nullDisp));
|
||||
ok(!nullDisp === true, "!nullDisp = " + !nullDisp);
|
||||
ok(String(nullDisp) === "null", "String(nullDisp) = " + String(nullDisp));
|
||||
|
||||
function do_test() {}
|
||||
function nosemicolon() {} nosemicolon();
|
||||
|
|
Loading…
Reference in a new issue