Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
77e93ad8
Commit
77e93ad8
authored
Jul 20, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Throw type errors in Boolean functions.
parent
bd87f97e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
bool.c
dlls/jscript/bool.c
+4
-8
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/bool.c
View file @
77e93ad8
...
...
@@ -46,10 +46,8 @@ static HRESULT Bool_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
TRACE
(
"
\n
"
);
if
(
!
is_class
(
dispex
,
JSCLASS_BOOLEAN
))
{
FIXME
(
"throw TypeError
\n
"
);
return
E_FAIL
;
}
if
(
!
is_class
(
dispex
,
JSCLASS_BOOLEAN
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_BOOL
,
NULL
);
if
(
retv
)
{
BoolInstance
*
bool
=
(
BoolInstance
*
)
dispex
;
...
...
@@ -81,10 +79,8 @@ static HRESULT Bool_valueOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
{
TRACE
(
"
\n
"
);
if
(
!
is_class
(
dispex
,
JSCLASS_BOOLEAN
))
{
FIXME
(
"throw TypeError
\n
"
);
return
E_FAIL
;
}
if
(
!
is_class
(
dispex
,
JSCLASS_BOOLEAN
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_BOOL
,
NULL
);
if
(
retv
)
{
BoolInstance
*
bool
=
(
BoolInstance
*
)
dispex
;
...
...
dlls/jscript/jscript_En.rc
View file @
77e93ad8
...
...
@@ -23,5 +23,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
IDS_NOT_DATE "'[object]' is not a date object"
IDS_NOT_BOOL "Boolean object expected"
IDS_INVALID_LENGTH "Array length must be a finite positive integer"
}
dlls/jscript/resource.h
View file @
77e93ad8
...
...
@@ -19,4 +19,5 @@
#include <windef.h>
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_BOOL 0x1392
#define IDS_INVALID_LENGTH 0x13A5
dlls/jscript/tests/api.js
View file @
77e93ad8
...
...
@@ -1299,5 +1299,6 @@ function exception_test(func, type) {
}
exception_test
(
function
()
{
arr
.
toString
=
Date
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
);
exception_test
(
function
()
{
Array
(
-
3
);},
"RangeError"
);
exception_test
(
function
()
{
arr
.
toString
=
Boolean
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
);
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