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
fba4e376
Commit
fba4e376
authored
Jul 22, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw TypeError in Function_toString.
parent
d8e841ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
function.c
dlls/jscript/function.c
+2
-4
jscript_En.rc
dlls/jscript/jscript_En.rc
+1
-0
resource.h
dlls/jscript/resource.h
+1
-0
api.js
dlls/jscript/tests/api.js
+1
-0
No files found.
dlls/jscript/function.c
View file @
fba4e376
...
...
@@ -272,10 +272,8 @@ static HRESULT Function_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISP
TRACE
(
"
\n
"
);
if
(
!
is_class
(
dispex
,
JSCLASS_FUNCTION
))
{
FIXME
(
"throw TypeError
\n
"
);
return
E_FAIL
;
}
if
(
!
is_class
(
dispex
,
JSCLASS_FUNCTION
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
function
=
(
FunctionInstance
*
)
dispex
;
...
...
dlls/jscript/jscript_En.rc
View file @
fba4e376
...
...
@@ -25,6 +25,7 @@ STRINGTABLE DISCARDABLE
IDS_INVALID_CALL_ARG "Invalid procedure call or argument"
IDS_NO_PROPERTY "Object doesn't support this property or method"
IDS_ARG_NOT_OPT "Argument not optional"
IDS_NOT_FUNC "Function expected"
IDS_NOT_DATE "'[object]' is not a date object"
IDS_NOT_NUM "Number expected"
IDS_UNDEFINED "'|' is undefined"
...
...
dlls/jscript/resource.h
View file @
fba4e376
...
...
@@ -21,6 +21,7 @@
#define IDS_INVALID_CALL_ARG 0x0005
#define IDS_NO_PROPERTY 0x01B6
#define IDS_ARG_NOT_OPT 0x01c1
#define IDS_NOT_FUNC 0x138A
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_NUM 0x1389
#define IDS_UNDEFINED 0x1391
...
...
dlls/jscript/tests/api.js
View file @
fba4e376
...
...
@@ -1314,5 +1314,6 @@ exception_test(function() {arr.test();}, "TypeError", -2146827850);
exception_test
(
function
()
{
arr
.
toString
=
Number
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
,
-
2146823287
);
exception_test
(
function
()
{(
new
Number
(
3
)).
toString
(
1
);},
"TypeError"
,
-
2146828283
);
exception_test
(
function
()
{
not_existing_variable
.
something
();},
"TypeError"
,
-
2146823279
);
exception_test
(
function
()
{
arr
.
toString
=
Function
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
,
-
2146823286
);
reportSuccess
();
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