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
52ac3b3b
Commit
52ac3b3b
authored
Sep 24, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added Object.toString implementation for variable object.
parent
c168918d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
object.c
dlls/jscript/object.c
+1
-1
api.js
dlls/jscript/tests/api.js
+5
-1
No files found.
dlls/jscript/object.c
View file @
52ac3b3b
...
...
@@ -51,7 +51,7 @@ static HRESULT Object_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, D
static
const
WCHAR
regexpW
[]
=
{
'R'
,
'e'
,
'g'
,
'E'
,
'x'
,
'p'
,
0
};
static
const
WCHAR
stringW
[]
=
{
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
/* Keep in sync with jsclass_t enum */
static
const
WCHAR
*
names
[]
=
{
NULL
,
arrayW
,
booleanW
,
dateW
,
errorW
,
static
const
WCHAR
*
names
[]
=
{
objectW
,
arrayW
,
booleanW
,
dateW
,
errorW
,
functionW
,
NULL
,
mathW
,
numberW
,
objectW
,
regexpW
,
stringW
,
objectW
};
TRACE
(
"
\n
"
);
...
...
dlls/jscript/tests/api.js
View file @
52ac3b3b
...
...
@@ -88,7 +88,11 @@ 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
());
tmp
=
Object
.
prototype
.
toString
.
call
(
testObj
);
ok
(
tmp
===
"[object Object]"
,
"'' + new Object() = "
+
tmp
);
ok
(
tmp
===
"[object Object]"
,
"toString.call(testObj) = "
+
tmp
);
tmp
=
Object
.
prototype
.
toString
.
call
(
this
);
ok
(
tmp
===
"[object Object]"
,
"toString.call(this) = "
+
tmp
);
(
function
()
{
tmp
=
Object
.
prototype
.
toString
.
call
(
arguments
);
})();
ok
(
tmp
===
"[object Object]"
,
"toString.call(arguments) = "
+
tmp
);
ok
(
Object
(
1
)
instanceof
Number
,
"Object(1) is not instance of Number"
);
ok
(
Object
(
""
)
instanceof
String
,
"Object('') is not instance of String"
);
...
...
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