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
5323a454
Commit
5323a454
authored
Aug 12, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed Object.toLocaleString implementation.
parent
9f0969fb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
1 deletion
+30
-1
dispex.c
dlls/jscript/dispex.c
+17
-0
jscript.h
dlls/jscript/jscript.h
+1
-0
object.c
dlls/jscript/object.c
+4
-1
api.js
dlls/jscript/tests/api.js
+8
-0
No files found.
dlls/jscript/dispex.c
View file @
5323a454
...
...
@@ -844,6 +844,23 @@ HRESULT jsdisp_call(DispatchEx *disp, DISPID id, LCID lcid, WORD flags, DISPPARA
return
invoke_prop_func
(
disp
,
disp
,
prop
,
lcid
,
flags
,
dp
,
retv
,
ei
,
caller
);
}
HRESULT
jsdisp_call_name
(
DispatchEx
*
disp
,
const
WCHAR
*
name
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
dispex_prop_t
*
prop
;
HRESULT
hres
;
hres
=
find_prop_name_prot
(
disp
,
name
,
TRUE
,
&
prop
);
if
(
FAILED
(
hres
))
return
hres
;
memset
(
ei
,
0
,
sizeof
(
*
ei
));
if
(
retv
)
V_VT
(
retv
)
=
VT_EMPTY
;
return
invoke_prop_func
(
disp
,
disp
,
prop
,
lcid
,
flags
,
dp
,
retv
,
ei
,
caller
);
}
HRESULT
disp_call
(
IDispatch
*
disp
,
DISPID
id
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
{
...
...
dlls/jscript/jscript.h
View file @
5323a454
...
...
@@ -131,6 +131,7 @@ DispatchEx *iface_to_jsdisp(IUnknown*);
HRESULT
disp_call
(
IDispatch
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_call_value
(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_call
(
DispatchEx
*
,
DISPID
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_call_name
(
DispatchEx
*
,
const
WCHAR
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
disp_propget
(
IDispatch
*
,
DISPID
,
LCID
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
disp_propput
(
IDispatch
*
,
DISPID
,
LCID
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
HRESULT
jsdisp_propget
(
DispatchEx
*
,
DISPID
,
LCID
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
...
...
dlls/jscript/object.c
View file @
5323a454
...
...
@@ -74,8 +74,11 @@ static HRESULT Object_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
static
HRESULT
Object_toLocaleString
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
VARIANT
*
retv
,
jsexcept_t
*
ei
,
IServiceProvider
*
sp
)
{
DISPPARAMS
params
=
{
NULL
,
NULL
,
0
,
0
};
TRACE
(
"
\n
"
);
return
Object_toString
(
dispex
,
lcid
,
flags
,
dp
,
retv
,
ei
,
sp
);
return
jsdisp_call_name
(
dispex
,
toStringW
,
lcid
,
DISPATCH_METHOD
,
&
params
,
retv
,
ei
,
sp
);
}
static
HRESULT
Object_valueOf
(
DispatchEx
*
dispex
,
LCID
lcid
,
WORD
flags
,
DISPPARAMS
*
dp
,
...
...
dlls/jscript/tests/api.js
View file @
5323a454
...
...
@@ -77,6 +77,14 @@ ok(tmp.f() === "[object RegExp]", "tmp.f() = " + tmp.f());
(
tmp
=
new
String
).
f
=
Object
.
prototype
.
toString
;
ok
(
tmp
.
f
()
===
"[object String]"
,
"tmp.f() = "
+
tmp
.
f
());
var
obj
=
new
Object
();
obj
.
toString
=
function
(
x
)
{
ok
(
arguments
.
length
===
0
,
"arguments.length = "
+
arguments
.
length
);
return
"test"
;
};
ok
((
tmp
=
obj
.
toLocaleString
())
===
"test"
,
"obj.toLocaleString() = "
+
tmp
);
ok
((
tmp
=
obj
.
toLocaleString
(
1
))
===
"test"
,
"obj.toLocaleString(1) = "
+
tmp
);
ok
(
""
.
length
===
0
,
"
\"\"
.length = "
+
""
.
length
);
ok
(
getVT
(
""
.
length
)
==
"VT_I4"
,
"
\"\"
.length = "
+
""
.
length
);
ok
(
"abc"
.
length
===
3
,
"
\"
abc
\"
.length = "
+
"abc"
.
length
);
...
...
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