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
8dd1d9b9
Commit
8dd1d9b9
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 TypeErrors when _value functions are used as a function.
parent
412e0af2
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
51 additions
and
4 deletions
+51
-4
array.c
dlls/jscript/array.c
+2
-0
bool.c
dlls/jscript/bool.c
+11
-1
date.c
dlls/jscript/date.c
+10
-1
error.c
dlls/jscript/error.c
+10
-1
number.c
dlls/jscript/number.c
+2
-0
object.c
dlls/jscript/object.c
+2
-0
regexp.c
dlls/jscript/regexp.c
+10
-1
string.c
dlls/jscript/string.c
+2
-0
api.js
dlls/jscript/tests/api.js
+2
-0
No files found.
dlls/jscript/array.c
View file @
8dd1d9b9
...
@@ -770,6 +770,8 @@ static HRESULT Array_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
...
@@ -770,6 +770,8 @@ static HRESULT Array_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
case
INVOKE_PROPERTYGET
:
case
INVOKE_PROPERTYGET
:
return
array_join
(
dispex
,
lcid
,
((
ArrayInstance
*
)
dispex
)
->
length
,
default_separatorW
,
retv
,
ei
,
sp
);
return
array_join
(
dispex
,
lcid
,
((
ArrayInstance
*
)
dispex
)
->
length
,
default_separatorW
,
retv
,
ei
,
sp
);
default:
default:
...
...
dlls/jscript/bool.c
View file @
8dd1d9b9
...
@@ -116,8 +116,18 @@ static HRESULT Bool_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags, DIS
...
@@ -116,8 +116,18 @@ static HRESULT Bool_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags, DIS
static
HRESULT
Bool_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
static
HRESULT
Bool_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
{
FIXME
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
return
S_OK
;
}
}
static
const
builtin_prop_t
Bool_props
[]
=
{
static
const
builtin_prop_t
Bool_props
[]
=
{
...
...
dlls/jscript/date.c
View file @
8dd1d9b9
...
@@ -2040,8 +2040,17 @@ static HRESULT Date_getYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
...
@@ -2040,8 +2040,17 @@ static HRESULT Date_getYear(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
static
HRESULT
Date_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
static
HRESULT
Date_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
{
FIXME
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
return
S_OK
;
}
}
static
const
builtin_prop_t
Date_props
[]
=
{
static
const
builtin_prop_t
Date_props
[]
=
{
...
...
dlls/jscript/error.c
View file @
8dd1d9b9
...
@@ -141,8 +141,17 @@ static HRESULT Error_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags,
...
@@ -141,8 +141,17 @@ static HRESULT Error_isPrototypeOf(DispatchEx *dispex, LCID lcid, WORD flags,
static
HRESULT
Error_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
static
HRESULT
Error_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
{
FIXME
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
return
S_OK
;
}
}
static
void
Error_destructor
(
DispatchEx
*
dispex
)
static
void
Error_destructor
(
DispatchEx
*
dispex
)
...
...
dlls/jscript/number.c
View file @
8dd1d9b9
...
@@ -241,6 +241,8 @@ static HRESULT Number_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
...
@@ -241,6 +241,8 @@ static HRESULT Number_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
NumberInstance
*
number
=
(
NumberInstance
*
)
dispex
;
NumberInstance
*
number
=
(
NumberInstance
*
)
dispex
;
switch
(
flags
)
{
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
:
*
retv
=
number
->
num
;
*
retv
=
number
->
num
;
break
;
break
;
...
...
dlls/jscript/object.c
View file @
8dd1d9b9
...
@@ -120,6 +120,8 @@ static HRESULT Object_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
...
@@ -120,6 +120,8 @@ static HRESULT Object_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
case
DISPATCH_PROPERTYGET
:
case
DISPATCH_PROPERTYGET
:
V_VT
(
retv
)
=
VT_BSTR
;
V_VT
(
retv
)
=
VT_BSTR
;
V_BSTR
(
retv
)
=
SysAllocString
(
default_valueW
);
V_BSTR
(
retv
)
=
SysAllocString
(
default_valueW
);
...
...
dlls/jscript/regexp.c
View file @
8dd1d9b9
...
@@ -3516,8 +3516,17 @@ static HRESULT RegExp_test(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
...
@@ -3516,8 +3516,17 @@ static HRESULT RegExp_test(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
static
HRESULT
RegExp_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
static
HRESULT
RegExp_value
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
{
FIXME
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
default:
FIXME
(
"unimplemented flags %x
\n
"
,
flags
);
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
return
S_OK
;
}
}
static
void
RegExp_destructor
(
DispatchEx
*
dispex
)
static
void
RegExp_destructor
(
DispatchEx
*
dispex
)
...
...
dlls/jscript/string.c
View file @
8dd1d9b9
...
@@ -1485,6 +1485,8 @@ static HRESULT String_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
...
@@ -1485,6 +1485,8 @@ static HRESULT String_value(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
TRACE
(
"
\n
"
);
TRACE
(
"
\n
"
);
switch
(
flags
)
{
switch
(
flags
)
{
case
INVOKE_FUNC
:
return
throw_type_error
(
dispex
->
ctx
,
ei
,
IDS_NOT_FUNC
,
NULL
);
case
DISPATCH_PROPERTYGET
:
{
case
DISPATCH_PROPERTYGET
:
{
BSTR
str
=
SysAllocString
(
This
->
str
);
BSTR
str
=
SysAllocString
(
This
->
str
);
if
(
!
str
)
if
(
!
str
)
...
...
dlls/jscript/tests/api.js
View file @
8dd1d9b9
...
@@ -1315,5 +1315,7 @@ exception_test(function() {arr.toString = Number.prototype.toString; arr.toStrin
...
@@ -1315,5 +1315,7 @@ exception_test(function() {arr.toString = Number.prototype.toString; arr.toStrin
exception_test
(
function
()
{(
new
Number
(
3
)).
toString
(
1
);},
"TypeError"
,
-
2146828283
);
exception_test
(
function
()
{(
new
Number
(
3
)).
toString
(
1
);},
"TypeError"
,
-
2146828283
);
exception_test
(
function
()
{
not_existing_variable
.
something
();},
"TypeError"
,
-
2146823279
);
exception_test
(
function
()
{
not_existing_variable
.
something
();},
"TypeError"
,
-
2146823279
);
exception_test
(
function
()
{
arr
.
toString
=
Function
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
,
-
2146823286
);
exception_test
(
function
()
{
arr
.
toString
=
Function
.
prototype
.
toString
;
arr
.
toString
();},
"TypeError"
,
-
2146823286
);
exception_test
(
function
()
{
date
();},
"TypeError"
,
-
2146823286
);
exception_test
(
function
()
{
arr
();},
"TypeError"
,
-
2146823286
);
reportSuccess
();
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