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
99d1a852
Commit
99d1a852
authored
Dec 21, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 21, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added null and undefined values support to to_object.
parent
c092d825
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
jsutils.c
dlls/jscript/jsutils.c
+4
-3
api.js
dlls/jscript/tests/api.js
+2
-0
No files found.
dlls/jscript/jsutils.c
View file @
99d1a852
...
@@ -820,6 +820,10 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp)
...
@@ -820,6 +820,10 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp)
*
disp
=
to_disp
(
dispex
);
*
disp
=
to_disp
(
dispex
);
break
;
break
;
case
JSV_UNDEFINED
:
case
JSV_NULL
:
WARN
(
"object expected
\n
"
);
return
throw_type_error
(
ctx
,
JS_E_OBJECT_EXPECTED
,
NULL
);
case
JSV_VARIANT
:
case
JSV_VARIANT
:
switch
(
V_VT
(
get_variant
(
val
)))
{
switch
(
V_VT
(
get_variant
(
val
)))
{
case
VT_ARRAY
|
VT_VARIANT
:
case
VT_ARRAY
|
VT_VARIANT
:
...
@@ -835,9 +839,6 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp)
...
@@ -835,9 +839,6 @@ HRESULT to_object(script_ctx_t *ctx, jsval_t val, IDispatch **disp)
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
break
;
break
;
default:
FIXME
(
"unsupported %s
\n
"
,
debugstr_jsval
(
val
));
return
E_NOTIMPL
;
}
}
return
S_OK
;
return
S_OK
;
...
...
dlls/jscript/tests/api.js
View file @
99d1a852
...
@@ -2300,6 +2300,8 @@ testException(function() {+nullDisp.prop;}, "E_OBJECT_REQUIRED");
...
@@ -2300,6 +2300,8 @@ testException(function() {+nullDisp.prop;}, "E_OBJECT_REQUIRED");
testException
(
function
()
{
+
nullDisp
[
"prop"
];},
"E_OBJECT_REQUIRED"
);
testException
(
function
()
{
+
nullDisp
[
"prop"
];},
"E_OBJECT_REQUIRED"
);
testException
(
function
()
{
delete
(
new
Object
());},
"E_INVALID_DELETE"
);
testException
(
function
()
{
delete
(
new
Object
());},
"E_INVALID_DELETE"
);
testException
(
function
()
{
delete
false
;},
"E_INVALID_DELETE"
);
testException
(
function
()
{
delete
false
;},
"E_INVALID_DELETE"
);
testException
(
function
()
{
undefined
.
toString
();},
"E_OBJECT_EXPECTED"
);
testException
(
function
()
{
null
.
toString
();},
"E_OBJECT_EXPECTED"
);
obj
=
new
Object
();
obj
=
new
Object
();
obj
.
prop
=
1
;
obj
.
prop
=
1
;
...
...
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