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
d4926503
Commit
d4926503
authored
Jul 16, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Properly handle constructor property for most builtin constructors.
parent
cf802971
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
8 deletions
+20
-8
array.c
dlls/jscript/array.c
+1
-1
bool.c
dlls/jscript/bool.c
+1
-1
date.c
dlls/jscript/date.c
+1
-1
object.c
dlls/jscript/object.c
+1
-1
regexp.c
dlls/jscript/regexp.c
+1
-1
string.c
dlls/jscript/string.c
+1
-1
lang.js
dlls/jscript/tests/lang.js
+13
-1
vbarray.c
dlls/jscript/vbarray.c
+1
-1
No files found.
dlls/jscript/array.c
View file @
d4926503
...
...
@@ -1183,7 +1183,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdis
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
ArrayConstr_value
,
ArrayW
,
NULL
,
PROPF_CONSTR
|
1
,
&
array
->
dispex
,
ret
);
hres
=
create_builtin_
constructor
(
ctx
,
ArrayConstr_value
,
ArrayW
,
NULL
,
PROPF_CONSTR
|
1
,
&
array
->
dispex
,
ret
);
jsdisp_release
(
&
array
->
dispex
);
return
hres
;
...
...
dlls/jscript/bool.c
View file @
d4926503
...
...
@@ -190,7 +190,7 @@ HRESULT create_bool_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
BoolConstr_value
,
BooleanW
,
NULL
,
hres
=
create_builtin_
constructor
(
ctx
,
BoolConstr_value
,
BooleanW
,
NULL
,
PROPF_CONSTR
|
1
,
&
bool
->
dispex
,
ret
);
jsdisp_release
(
&
bool
->
dispex
);
...
...
dlls/jscript/date.c
View file @
d4926503
...
...
@@ -2631,7 +2631,7 @@ HRESULT create_date_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdisp
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
DateConstr_value
,
DateW
,
&
DateConstr_info
,
hres
=
create_builtin_
constructor
(
ctx
,
DateConstr_value
,
DateW
,
&
DateConstr_info
,
PROPF_CONSTR
|
7
,
date
,
ret
);
jsdisp_release
(
date
);
...
...
dlls/jscript/object.c
View file @
d4926503
...
...
@@ -264,7 +264,7 @@ HRESULT create_object_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi
{
static
const
WCHAR
ObjectW
[]
=
{
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
return
create_builtin_
function
(
ctx
,
ObjectConstr_value
,
ObjectW
,
NULL
,
PROPF_CONSTR
,
return
create_builtin_
constructor
(
ctx
,
ObjectConstr_value
,
ObjectW
,
NULL
,
PROPF_CONSTR
,
object_prototype
,
ret
);
}
...
...
dlls/jscript/regexp.c
View file @
d4926503
...
...
@@ -4143,7 +4143,7 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
RegExpConstr_value
,
RegExpW
,
&
RegExpConstr_info
,
hres
=
create_builtin_
constructor
(
ctx
,
RegExpConstr_value
,
RegExpW
,
&
RegExpConstr_info
,
PROPF_CONSTR
|
2
,
&
regexp
->
dispex
,
ret
);
jsdisp_release
(
&
regexp
->
dispex
);
...
...
dlls/jscript/string.c
View file @
d4926503
...
...
@@ -1669,7 +1669,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsdi
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
StringConstr_value
,
StringW
,
&
StringConstr_info
,
hres
=
create_builtin_
constructor
(
ctx
,
StringConstr_value
,
StringW
,
&
StringConstr_info
,
PROPF_CONSTR
|
1
,
&
string
->
dispex
,
ret
);
jsdisp_release
(
&
string
->
dispex
);
...
...
dlls/jscript/tests/lang.js
View file @
d4926503
...
...
@@ -91,7 +91,19 @@ ok(Function.prototype.prototype === undefined, "Function.prototype.prototype is
ok
(
Date
.
prototype
!==
undefined
,
"Date.prototype is undefined"
);
ok
(
Date
.
prototype
.
prototype
===
undefined
,
"Date.prototype is not undefined"
);
ok
(
Number
.
prototype
.
constructor
===
Number
,
"Number.prototype.constructor !== Number"
);
function
testConstructor
(
constr
,
name
)
{
ok
(
constr
.
prototype
.
constructor
===
constr
,
name
+
".prototype.constructor !== "
+
name
);
}
testConstructor
(
Object
,
"Object"
);
testConstructor
(
String
,
"String"
);
testConstructor
(
Array
,
"Array"
);
testConstructor
(
Boolean
,
"Boolean"
);
testConstructor
(
Number
,
"Number"
);
testConstructor
(
RegExp
,
"RegExp"
);
//testConstructor(Function, "Function");
testConstructor
(
Date
,
"Date"
);
testConstructor
(
VBArray
,
"VBArray"
);
Function
.
prototype
.
test
=
true
;
ok
(
testFunc1
.
test
===
true
,
"testFunc1.test !== true"
);
...
...
dlls/jscript/vbarray.c
View file @
d4926503
...
...
@@ -326,7 +326,7 @@ HRESULT create_vbarray_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsd
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_builtin_
function
(
ctx
,
VBArrayConstr_value
,
VBArrayW
,
NULL
,
PROPF_CONSTR
|
1
,
&
vbarray
->
dispex
,
ret
);
hres
=
create_builtin_
constructor
(
ctx
,
VBArrayConstr_value
,
VBArrayW
,
NULL
,
PROPF_CONSTR
|
1
,
&
vbarray
->
dispex
,
ret
);
jsdisp_release
(
&
vbarray
->
dispex
);
return
hres
;
...
...
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