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
534b977c
Commit
534b977c
authored
Nov 22, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Nov 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw proper error when calling Set constructor as method.
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
84f7f601
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
set.c
dlls/jscript/set.c
+3
-0
documentmode.js
dlls/mshtml/tests/documentmode.js
+7
-0
No files found.
dlls/jscript/set.c
View file @
534b977c
...
...
@@ -572,6 +572,9 @@ static HRESULT Set_constructor(script_ctx_t *ctx, jsval_t vthis, WORD flags, uns
*
r
=
jsval_obj
(
&
set
->
dispex
);
return
S_OK
;
case
DISPATCH_METHOD
:
return
throw_error
(
ctx
,
JS_E_WRONG_THIS
,
L"Set"
);
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
...
...
dlls/mshtml/tests/documentmode.js
View file @
534b977c
...
...
@@ -1201,6 +1201,13 @@ sync_test("func_scope", function() {
sync_test
(
"set_obj"
,
function
()
{
if
(
!
(
"Set"
in
window
))
return
;
try
{
var
s
=
Set
();
ok
(
false
,
"expected exception calling constructor as method"
);
}
catch
(
e
)
{
ok
(
e
.
number
===
0xa13fc
-
0x80000000
,
"calling constructor as method threw "
+
e
.
number
);
}
var
s
=
new
Set
,
r
;
ok
(
Object
.
getPrototypeOf
(
s
)
===
Set
.
prototype
,
"unexpected Set prototype"
);
...
...
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