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
e368fd54
Commit
e368fd54
authored
Oct 01, 2010
by
Reece Dunn
Committed by
Alexandre Julliard
Oct 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw TypeError if T in 'new T' is not an object.
parent
6d5bfce3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
engine.c
dlls/jscript/engine.c
+10
-3
api.js
dlls/jscript/tests/api.js
+3
-0
No files found.
dlls/jscript/engine.c
View file @
e368fd54
...
...
@@ -1562,10 +1562,17 @@ HRESULT new_expression_eval(exec_ctx_t *ctx, expression_t *_expr, DWORD flags, j
if
(
FAILED
(
hres
))
return
hres
;
if
(
V_VT
(
&
constr
)
!=
VT_DISPATCH
)
{
FIXME
(
"throw TypeError
\n
"
);
/* NOTE: Should use to_object here */
if
(
V_VT
(
&
constr
)
==
VT_NULL
)
{
VariantClear
(
&
constr
);
return
E_FAIL
;
return
throw_type_error
(
ctx
->
parser
->
script
,
ei
,
IDS_OBJECT_EXPECTED
,
NULL
);
}
else
if
(
V_VT
(
&
constr
)
!=
VT_DISPATCH
)
{
VariantClear
(
&
constr
);
return
throw_type_error
(
ctx
->
parser
->
script
,
ei
,
IDS_UNSUPPORTED_ACTION
,
NULL
);
}
else
if
(
!
V_DISPATCH
(
&
constr
))
{
VariantClear
(
&
constr
);
return
throw_type_error
(
ctx
->
parser
->
script
,
ei
,
IDS_NO_PROPERTY
,
NULL
);
}
hres
=
disp_call
(
ctx
->
parser
->
script
,
V_DISPATCH
(
&
constr
),
DISPID_VALUE
,
...
...
dlls/jscript/tests/api.js
View file @
e368fd54
...
...
@@ -1894,6 +1894,9 @@ exception_test(function() {(new Object()) instanceof nullDisp;}, "TypeError", -2
exception_test
(
function
()
{
"test"
in
3
;},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
"test"
in
null
;},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
"test"
in
nullDisp
;},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
new
3
;},
"TypeError"
,
-
2146827843
);
exception_test
(
function
()
{
new
null
;},
"TypeError"
,
-
2146823281
);
exception_test
(
function
()
{
new
nullDisp
;},
"TypeError"
,
-
2146827850
);
function
testThisExcept
(
func
,
number
)
{
exception_test
(
function
()
{
func
.
call
(
new
Object
())},
"TypeError"
,
number
);
...
...
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