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
7f2d50f3
Commit
7f2d50f3
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: Throw type error from call and apply functions.
parent
52ac3b3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
9 deletions
+12
-9
function.c
dlls/jscript/function.c
+4
-9
api.js
dlls/jscript/tests/api.js
+8
-0
No files found.
dlls/jscript/function.c
View file @
7f2d50f3
...
...
@@ -416,13 +416,10 @@ static HRESULT Function_apply(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
TRACE
(
"
\n
"
);
if
(
!
(
function
=
function_from_vdisp
(
jsthis
)))
{
FIXME
(
"dispex is not a function
\n
"
);
return
E_FAIL
;
}
if
(
!
(
function
=
function_this
(
jsthis
)))
return
throw_type_error
(
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
argc
=
arg_cnt
(
dp
);
if
(
argc
)
{
hres
=
to_object
(
ctx
,
get_arg
(
dp
,
0
),
&
this_obj
);
if
(
FAILED
(
hres
))
...
...
@@ -471,10 +468,8 @@ static HRESULT Function_call(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DIS
TRACE
(
"
\n
"
);
if
(
!
(
function
=
function_from_vdisp
(
jsthis
)))
{
FIXME
(
"dispex is not a function
\n
"
);
return
E_FAIL
;
}
if
(
!
(
function
=
function_this
(
jsthis
)))
return
throw_type_error
(
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
argc
=
arg_cnt
(
dp
);
if
(
argc
)
{
...
...
dlls/jscript/tests/api.js
View file @
7f2d50f3
...
...
@@ -1688,6 +1688,14 @@ function testArrayThis(func) {
testArrayThis
(
"toString"
);
function
testFunctionThis
(
func
)
{
testThisExcept
(
Function
.
prototype
[
func
],
-
2146823286
);
}
testFunctionThis
(
"toString"
);
testFunctionThis
(
"call"
);
testFunctionThis
(
"apply"
);
function
testArrayHostThis
(
func
)
{
exception_test
(
function
()
{
Array
.
prototype
[
func
].
call
(
testObj
);
},
"TypeError"
,
-
2146823274
);
}
...
...
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