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
789afcdc
Commit
789afcdc
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 more errors in Date functions.
parent
5b21893a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
75 deletions
+32
-75
date.c
dlls/jscript/date.c
+30
-75
jscript_En.rc
dlls/jscript/jscript_En.rc
+1
-0
resource.h
dlls/jscript/resource.h
+1
-0
No files found.
dlls/jscript/date.c
View file @
789afcdc
...
...
@@ -1370,11 +1370,8 @@ static HRESULT Date_setTime(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
v
);
if
(
FAILED
(
hres
))
...
...
@@ -1403,11 +1400,8 @@ static HRESULT Date_setMilliseconds(DispatchEx *dispex, LCID lcid, WORD flags, D
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
v
);
if
(
FAILED
(
hres
))
...
...
@@ -1439,11 +1433,8 @@ static HRESULT Date_setUTCMilliseconds(DispatchEx *dispex, LCID lcid, WORD flags
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
v
);
if
(
FAILED
(
hres
))
...
...
@@ -1475,11 +1466,8 @@ static HRESULT Date_setSeconds(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
local_time
(
date
->
time
,
date
);
...
...
@@ -1521,11 +1509,8 @@ static HRESULT Date_setUTCSeconds(DispatchEx *dispex, LCID lcid, WORD flags, DIS
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
date
->
time
;
...
...
@@ -1567,11 +1552,8 @@ static HRESULT Date_setMinutes(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
local_time
(
date
->
time
,
date
);
...
...
@@ -1621,11 +1603,8 @@ static HRESULT Date_setUTCMinutes(DispatchEx *dispex, LCID lcid, WORD flags, DIS
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
date
->
time
;
...
...
@@ -1675,11 +1654,8 @@ static HRESULT Date_setHours(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
local_time
(
date
->
time
,
date
);
...
...
@@ -1736,11 +1712,8 @@ static HRESULT Date_setUTCHours(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
date
->
time
;
...
...
@@ -1797,11 +1770,8 @@ static HRESULT Date_setDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
v
);
if
(
FAILED
(
hres
))
...
...
@@ -1833,11 +1803,8 @@ static HRESULT Date_setUTCDate(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
hres
=
to_number
(
dispex
->
ctx
,
get_arg
(
dp
,
0
),
ei
,
&
v
);
if
(
FAILED
(
hres
))
...
...
@@ -1869,11 +1836,8 @@ static HRESULT Date_setMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
local_time
(
date
->
time
,
date
);
...
...
@@ -1915,11 +1879,8 @@ static HRESULT Date_setUTCMonth(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
date
->
time
;
...
...
@@ -1961,11 +1922,8 @@ static HRESULT Date_setFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
local_time
(
date
->
time
,
date
);
...
...
@@ -2014,11 +1972,8 @@ static HRESULT Date_setUTCFullYear(DispatchEx *dispex, LCID lcid, WORD flags, DI
if
(
!
is_class
(
dispex
,
JSCLASS_DATE
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_DATE
,
NULL
);
if
(
!
arg_cnt
(
dp
))
{
FIXME
(
"throw ArgumentNotOptional
\n
"
);
if
(
retv
)
num_set_nan
(
retv
);
return
S_OK
;
}
if
(
!
arg_cnt
(
dp
))
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_ARG_NOT_OPT
,
NULL
);
date
=
(
DateInstance
*
)
dispex
;
t
=
date
->
time
;
...
...
dlls/jscript/jscript_En.rc
View file @
789afcdc
...
...
@@ -22,6 +22,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
IDS_ARG_NOT_OPT "Argument not optional"
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 @
789afcdc
...
...
@@ -18,6 +18,7 @@
#include <windef.h>
#define IDS_ARG_NOT_OPT 0x01c1
#define IDS_NOT_DATE 0x138E
#define IDS_NOT_BOOL 0x1392
#define IDS_INVALID_LENGTH 0x13A5
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