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
662a8525
Commit
662a8525
authored
Oct 13, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 14, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed Global functions lengths.
parent
657c8327
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
81 additions
and
37 deletions
+81
-37
activex.c
dlls/jscript/activex.c
+2
-1
array.c
dlls/jscript/array.c
+1
-1
bool.c
dlls/jscript/bool.c
+2
-1
date.c
dlls/jscript/date.c
+2
-1
error.c
dlls/jscript/error.c
+1
-1
function.c
dlls/jscript/function.c
+1
-1
global.c
dlls/jscript/global.c
+28
-28
number.c
dlls/jscript/number.c
+2
-1
regexp.c
dlls/jscript/regexp.c
+2
-1
string.c
dlls/jscript/string.c
+1
-1
api.js
dlls/jscript/tests/api.js
+39
-0
No files found.
dlls/jscript/activex.c
View file @
662a8525
...
@@ -192,7 +192,8 @@ HRESULT create_activex_constr(script_ctx_t *ctx, DispatchEx **ret)
...
@@ -192,7 +192,8 @@ HRESULT create_activex_constr(script_ctx_t *ctx, DispatchEx **ret)
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
ActiveXObject_value
,
ActiveXObjectW
,
NULL
,
PROPF_CONSTR
,
prototype
,
ret
);
hres
=
create_builtin_function
(
ctx
,
ActiveXObject_value
,
ActiveXObjectW
,
NULL
,
PROPF_CONSTR
|
1
,
prototype
,
ret
);
jsdisp_release
(
prototype
);
jsdisp_release
(
prototype
);
return
hres
;
return
hres
;
...
...
dlls/jscript/array.c
View file @
662a8525
...
@@ -1166,7 +1166,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Dis
...
@@ -1166,7 +1166,7 @@ HRESULT create_array_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Dis
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
ArrayConstr_value
,
ArrayW
,
NULL
,
PROPF_CONSTR
,
&
array
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
ArrayConstr_value
,
ArrayW
,
NULL
,
PROPF_CONSTR
|
1
,
&
array
->
dispex
,
ret
);
jsdisp_release
(
&
array
->
dispex
);
jsdisp_release
(
&
array
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/bool.c
View file @
662a8525
...
@@ -191,7 +191,8 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Disp
...
@@ -191,7 +191,8 @@ HRESULT create_bool_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Disp
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
BoolConstr_value
,
BooleanW
,
NULL
,
PROPF_CONSTR
,
&
bool
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
BoolConstr_value
,
BooleanW
,
NULL
,
PROPF_CONSTR
|
1
,
&
bool
->
dispex
,
ret
);
jsdisp_release
(
&
bool
->
dispex
);
jsdisp_release
(
&
bool
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/date.c
View file @
662a8525
...
@@ -2624,7 +2624,8 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Disp
...
@@ -2624,7 +2624,8 @@ HRESULT create_date_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Disp
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
DateConstr_value
,
DateW
,
&
DateConstr_info
,
PROPF_CONSTR
,
date
,
ret
);
hres
=
create_builtin_function
(
ctx
,
DateConstr_value
,
DateW
,
&
DateConstr_info
,
PROPF_CONSTR
|
7
,
date
,
ret
);
jsdisp_release
(
date
);
jsdisp_release
(
date
);
return
hres
;
return
hres
;
...
...
dlls/jscript/error.c
View file @
662a8525
...
@@ -381,7 +381,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
...
@@ -381,7 +381,7 @@ HRESULT init_error_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
if
(
SUCCEEDED
(
hres
))
if
(
SUCCEEDED
(
hres
))
hres
=
create_builtin_function
(
ctx
,
constr_val
[
i
],
names
[
i
],
NULL
,
hres
=
create_builtin_function
(
ctx
,
constr_val
[
i
],
names
[
i
],
NULL
,
PROPF_CONSTR
,
&
err
->
dispex
,
constr_addr
[
i
]);
PROPF_CONSTR
|
1
,
&
err
->
dispex
,
constr_addr
[
i
]);
jsdisp_release
(
&
err
->
dispex
);
jsdisp_release
(
&
err
->
dispex
);
VariantClear
(
&
v
);
VariantClear
(
&
v
);
...
...
dlls/jscript/function.c
View file @
662a8525
...
@@ -673,7 +673,7 @@ HRESULT init_function_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
...
@@ -673,7 +673,7 @@ HRESULT init_function_constr(script_ctx_t *ctx, DispatchEx *object_prototype)
prot
->
value_proc
=
FunctionProt_value
;
prot
->
value_proc
=
FunctionProt_value
;
prot
->
name
=
prototypeW
;
prot
->
name
=
prototypeW
;
hres
=
create_function
(
ctx
,
NULL
,
PROPF_CONSTR
,
TRUE
,
&
prot
->
dispex
,
&
constr
);
hres
=
create_function
(
ctx
,
NULL
,
PROPF_CONSTR
|
1
,
TRUE
,
&
prot
->
dispex
,
&
constr
);
if
(
SUCCEEDED
(
hres
))
{
if
(
SUCCEEDED
(
hres
))
{
constr
->
value_proc
=
FunctionConstr_value
;
constr
->
value_proc
=
FunctionConstr_value
;
constr
->
name
=
FunctionW
;
constr
->
name
=
FunctionW
;
...
...
dlls/jscript/global.c
View file @
662a8525
...
@@ -859,44 +859,44 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
...
@@ -859,44 +859,44 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
}
}
static
const
builtin_prop_t
JSGlobal_props
[]
=
{
static
const
builtin_prop_t
JSGlobal_props
[]
=
{
{
ActiveXObjectW
,
JSGlobal_ActiveXObject
,
PROPF_CONSTR
},
{
ActiveXObjectW
,
JSGlobal_ActiveXObject
,
PROPF_CONSTR
|
1
},
{
ArrayW
,
JSGlobal_Array
,
PROPF_CONSTR
},
{
ArrayW
,
JSGlobal_Array
,
PROPF_CONSTR
|
1
},
{
BooleanW
,
JSGlobal_Boolean
,
PROPF_CONSTR
},
{
BooleanW
,
JSGlobal_Boolean
,
PROPF_CONSTR
|
1
},
{
CollectGarbageW
,
JSGlobal_CollectGarbage
,
PROPF_METHOD
},
{
CollectGarbageW
,
JSGlobal_CollectGarbage
,
PROPF_METHOD
},
{
DateW
,
JSGlobal_Date
,
PROPF_CONSTR
},
{
DateW
,
JSGlobal_Date
,
PROPF_CONSTR
|
7
},
{
EnumeratorW
,
JSGlobal_Enumerator
,
PROPF_METHOD
},
{
EnumeratorW
,
JSGlobal_Enumerator
,
PROPF_METHOD
|
7
},
{
ErrorW
,
JSGlobal_Error
,
PROPF_CONSTR
},
{
ErrorW
,
JSGlobal_Error
,
PROPF_CONSTR
|
1
},
{
EvalErrorW
,
JSGlobal_EvalError
,
PROPF_CONSTR
},
{
EvalErrorW
,
JSGlobal_EvalError
,
PROPF_CONSTR
|
1
},
{
FunctionW
,
JSGlobal_Function
,
PROPF_CONSTR
},
{
FunctionW
,
JSGlobal_Function
,
PROPF_CONSTR
|
1
},
{
_GetObjectW
,
JSGlobal_GetObject
,
PROPF_METHOD
},
{
_GetObjectW
,
JSGlobal_GetObject
,
PROPF_METHOD
|
2
},
{
InfinityW
,
JSGlobal_Infinity
,
0
},
{
InfinityW
,
JSGlobal_Infinity
,
0
},
/* {MathW, JSGlobal_Math, 0}, */
/* {MathW, JSGlobal_Math, 0}, */
{
NaNW
,
JSGlobal_NaN
,
0
},
{
NaNW
,
JSGlobal_NaN
,
0
},
{
NumberW
,
JSGlobal_Number
,
PROPF_CONSTR
},
{
NumberW
,
JSGlobal_Number
,
PROPF_CONSTR
|
1
},
{
ObjectW
,
JSGlobal_Object
,
PROPF_CONSTR
},
{
ObjectW
,
JSGlobal_Object
,
PROPF_CONSTR
|
1
},
{
RangeErrorW
,
JSGlobal_RangeError
,
PROPF_CONSTR
},
{
RangeErrorW
,
JSGlobal_RangeError
,
PROPF_CONSTR
|
1
},
{
ReferenceErrorW
,
JSGlobal_ReferenceError
,
PROPF_CONSTR
},
{
ReferenceErrorW
,
JSGlobal_ReferenceError
,
PROPF_CONSTR
|
1
},
{
RegExpW
,
JSGlobal_RegExp
,
PROPF_CONSTR
},
{
RegExpW
,
JSGlobal_RegExp
,
PROPF_CONSTR
|
2
},
{
ScriptEngineW
,
JSGlobal_ScriptEngine
,
PROPF_METHOD
},
{
ScriptEngineW
,
JSGlobal_ScriptEngine
,
PROPF_METHOD
},
{
ScriptEngineBuildVersionW
,
JSGlobal_ScriptEngineBuildVersion
,
PROPF_METHOD
},
{
ScriptEngineBuildVersionW
,
JSGlobal_ScriptEngineBuildVersion
,
PROPF_METHOD
},
{
ScriptEngineMajorVersionW
,
JSGlobal_ScriptEngineMajorVersion
,
PROPF_METHOD
},
{
ScriptEngineMajorVersionW
,
JSGlobal_ScriptEngineMajorVersion
,
PROPF_METHOD
},
{
ScriptEngineMinorVersionW
,
JSGlobal_ScriptEngineMinorVersion
,
PROPF_METHOD
},
{
ScriptEngineMinorVersionW
,
JSGlobal_ScriptEngineMinorVersion
,
PROPF_METHOD
},
{
StringW
,
JSGlobal_String
,
PROPF_CONSTR
},
{
StringW
,
JSGlobal_String
,
PROPF_CONSTR
|
1
},
{
SyntaxErrorW
,
JSGlobal_SyntaxError
,
PROPF_CONSTR
},
{
SyntaxErrorW
,
JSGlobal_SyntaxError
,
PROPF_CONSTR
|
1
},
{
TypeErrorW
,
JSGlobal_TypeError
,
PROPF_CONSTR
},
{
TypeErrorW
,
JSGlobal_TypeError
,
PROPF_CONSTR
|
1
},
{
URIErrorW
,
JSGlobal_URIError
,
PROPF_CONSTR
},
{
URIErrorW
,
JSGlobal_URIError
,
PROPF_CONSTR
|
1
},
{
VBArrayW
,
JSGlobal_VBArray
,
PROPF_METHOD
},
{
VBArrayW
,
JSGlobal_VBArray
,
PROPF_METHOD
|
1
},
{
decodeURIW
,
JSGlobal_decodeURI
,
PROPF_METHOD
},
{
decodeURIW
,
JSGlobal_decodeURI
,
PROPF_METHOD
|
1
},
{
decodeURIComponentW
,
JSGlobal_decodeURIComponent
,
PROPF_METHOD
},
{
decodeURIComponentW
,
JSGlobal_decodeURIComponent
,
PROPF_METHOD
|
1
},
{
encodeURIW
,
JSGlobal_encodeURI
,
PROPF_METHOD
},
{
encodeURIW
,
JSGlobal_encodeURI
,
PROPF_METHOD
|
1
},
{
encodeURIComponentW
,
JSGlobal_encodeURIComponent
,
PROPF_METHOD
},
{
encodeURIComponentW
,
JSGlobal_encodeURIComponent
,
PROPF_METHOD
|
1
},
{
escapeW
,
JSGlobal_escape
,
PROPF_METHOD
},
{
escapeW
,
JSGlobal_escape
,
PROPF_METHOD
|
1
},
{
evalW
,
JSGlobal_eval
,
PROPF_METHOD
|
1
},
{
evalW
,
JSGlobal_eval
,
PROPF_METHOD
|
1
},
{
isFiniteW
,
JSGlobal_isFinite
,
PROPF_METHOD
},
{
isFiniteW
,
JSGlobal_isFinite
,
PROPF_METHOD
|
1
},
{
isNaNW
,
JSGlobal_isNaN
,
PROPF_METHOD
},
{
isNaNW
,
JSGlobal_isNaN
,
PROPF_METHOD
|
1
},
{
parseFloatW
,
JSGlobal_parseFloat
,
PROPF_METHOD
},
{
parseFloatW
,
JSGlobal_parseFloat
,
PROPF_METHOD
|
1
},
{
parseIntW
,
JSGlobal_parseInt
,
PROPF_METHOD
|
2
},
{
parseIntW
,
JSGlobal_parseInt
,
PROPF_METHOD
|
2
},
{
unescapeW
,
JSGlobal_unescape
,
PROPF_METHOD
}
{
unescapeW
,
JSGlobal_unescape
,
PROPF_METHOD
|
1
}
};
};
static
const
builtin_info_t
JSGlobal_info
=
{
static
const
builtin_info_t
JSGlobal_info
=
{
...
...
dlls/jscript/number.c
View file @
662a8525
...
@@ -346,7 +346,8 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
...
@@ -346,7 +346,8 @@ HRESULT create_number_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
return
hres
;
return
hres
;
V_VT
(
&
number
->
num
)
=
VT_I4
;
V_VT
(
&
number
->
num
)
=
VT_I4
;
hres
=
create_builtin_function
(
ctx
,
NumberConstr_value
,
NumberW
,
NULL
,
PROPF_CONSTR
,
&
number
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
NumberConstr_value
,
NumberW
,
NULL
,
PROPF_CONSTR
|
1
,
&
number
->
dispex
,
ret
);
jsdisp_release
(
&
number
->
dispex
);
jsdisp_release
(
&
number
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/regexp.c
View file @
662a8525
...
@@ -3885,7 +3885,8 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
...
@@ -3885,7 +3885,8 @@ HRESULT create_regexp_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
RegExpConstr_value
,
RegExpW
,
NULL
,
PROPF_CONSTR
,
&
regexp
->
dispex
,
ret
);
hres
=
create_builtin_function
(
ctx
,
RegExpConstr_value
,
RegExpW
,
NULL
,
PROPF_CONSTR
|
2
,
&
regexp
->
dispex
,
ret
);
jsdisp_release
(
&
regexp
->
dispex
);
jsdisp_release
(
&
regexp
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/string.c
View file @
662a8525
...
@@ -1705,7 +1705,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
...
@@ -1705,7 +1705,7 @@ HRESULT create_string_constr(script_ctx_t *ctx, DispatchEx *object_prototype, Di
return
hres
;
return
hres
;
hres
=
create_builtin_function
(
ctx
,
StringConstr_value
,
StringW
,
&
StringConstr_info
,
hres
=
create_builtin_function
(
ctx
,
StringConstr_value
,
StringW
,
&
StringConstr_info
,
PROPF_CONSTR
,
&
string
->
dispex
,
ret
);
PROPF_CONSTR
|
1
,
&
string
->
dispex
,
ret
);
jsdisp_release
(
&
string
->
dispex
);
jsdisp_release
(
&
string
->
dispex
);
return
hres
;
return
hres
;
...
...
dlls/jscript/tests/api.js
View file @
662a8525
...
@@ -1941,4 +1941,43 @@ testFunctions(Function.prototype, [
...
@@ -1941,4 +1941,43 @@ testFunctions(Function.prototype, [
[
"toString"
,
0
]
[
"toString"
,
0
]
]);
]);
ok
(
ActiveXObject
.
length
==
1
,
"ActiveXObject.length = "
+
ActiveXObject
.
length
);
ok
(
Array
.
length
==
1
,
"Array.length = "
+
Array
.
length
);
ok
(
Boolean
.
length
==
1
,
"Boolean.length = "
+
Boolean
.
length
);
ok
(
CollectGarbage
.
length
==
0
,
"CollectGarbage.length = "
+
CollectGarbage
.
length
);
//ok(Date.length == 7, "Date.length = " + Date.length);
ok
(
Enumerator
.
length
==
7
,
"Enumerator.length = "
+
Enumerator
.
length
);
ok
(
Error
.
length
==
1
,
"Error.length = "
+
Error
.
length
);
ok
(
EvalError
.
length
==
1
,
"EvalError.length = "
+
EvalError
.
length
);
ok
(
Function
.
length
==
1
,
"Function.length = "
+
Function
.
length
);
ok
(
GetObject
.
length
==
2
,
"GetObject.length = "
+
GetObject
.
length
);
ok
(
Number
.
length
==
1
,
"Number.length = "
+
Number
.
length
);
ok
(
Object
.
length
==
0
,
"Object.length = "
+
Object
.
length
);
ok
(
RangeError
.
length
==
1
,
"RangeError.length = "
+
RangeError
.
length
);
ok
(
ReferenceError
.
length
==
1
,
"ReferenceError.length = "
+
ReferenceError
.
length
);
ok
(
RegExp
.
length
==
2
,
"RegExp.length = "
+
RegExp
.
length
);
ok
(
ScriptEngine
.
length
==
0
,
"ScriptEngine.length = "
+
ScriptEngine
.
length
);
ok
(
ScriptEngineBuildVersion
.
length
==
0
,
"ScriptEngineBuildVersion.length = "
+
ScriptEngineBuildVersion
.
length
);
ok
(
ScriptEngineMajorVersion
.
length
==
0
,
"ScriptEngineMajorVersion.length = "
+
ScriptEngineMajorVersion
.
length
);
ok
(
ScriptEngineMinorVersion
.
length
==
0
,
"ScriptEngineMinorVersion.length = "
+
ScriptEngineMinorVersion
.
length
);
//ok(String.length == 1, "String.length = " + String.length);
ok
(
SyntaxError
.
length
==
1
,
"SyntaxError.length = "
+
SyntaxError
.
length
);
ok
(
TypeError
.
length
==
1
,
"TypeError.length = "
+
TypeError
.
length
);
ok
(
URIError
.
length
==
1
,
"URIError.length = "
+
URIError
.
length
);
ok
(
VBArray
.
length
==
1
,
"VBArray.length = "
+
VBArray
.
length
);
ok
(
decodeURI
.
length
==
1
,
"decodeURI.length = "
+
decodeURI
.
length
);
ok
(
decodeURIComponent
.
length
==
1
,
"decodeURIComponent.length = "
+
decodeURIComponent
.
length
);
ok
(
encodeURI
.
length
==
1
,
"encodeURI.length = "
+
encodeURI
.
length
);
ok
(
encodeURIComponent
.
length
==
1
,
"encodeURIComponent.length = "
+
encodeURIComponent
.
length
);
ok
(
escape
.
length
==
1
,
"escape.length = "
+
escape
.
length
);
ok
(
eval
.
length
==
1
,
"eval.length = "
+
eval
.
length
);
ok
(
isFinite
.
length
==
1
,
"isFinite.length = "
+
isFinite
.
length
);
ok
(
isNaN
.
length
==
1
,
"isNaN.length = "
+
isNaN
.
length
);
ok
(
parseFloat
.
length
==
1
,
"parseFloat.length = "
+
parseFloat
.
length
);
ok
(
parseInt
.
length
==
2
,
"parseInt.length = "
+
parseInt
.
length
);
ok
(
unescape
.
length
==
1
,
"unescape.length = "
+
unescape
.
length
);
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