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
90d3569c
Commit
90d3569c
authored
Feb 05, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Don't use builtin property for *Error constructors.
parent
b7a27333
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
72 deletions
+28
-72
global.c
dlls/jscript/global.c
+28
-72
No files found.
dlls/jscript/global.c
View file @
90d3569c
...
...
@@ -112,71 +112,6 @@ static WCHAR int_to_char(int i)
return
'A'
+
i
-
10
;
}
static
HRESULT
constructor_call
(
jsdisp_t
*
constr
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
if
(
flags
!=
DISPATCH_PROPERTYGET
)
return
jsdisp_call_value
(
constr
,
NULL
,
flags
,
argc
,
argv
,
r
);
*
r
=
jsval_obj
(
jsdisp_addref
(
constr
));
return
S_OK
;
}
static
HRESULT
JSGlobal_EvalError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
eval_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_RangeError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
range_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_RegExpError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
regexp_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_ReferenceError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
reference_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_SyntaxError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
syntax_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_TypeError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
type_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_URIError
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
TRACE
(
"
\n
"
);
return
constructor_call
(
ctx
->
uri_error_constr
,
flags
,
argc
,
argv
,
r
);
}
static
HRESULT
JSGlobal_Enumerator
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
{
...
...
@@ -1001,18 +936,11 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
static
const
builtin_prop_t
JSGlobal_props
[]
=
{
{
CollectGarbageW
,
JSGlobal_CollectGarbage
,
PROPF_METHOD
},
{
EnumeratorW
,
JSGlobal_Enumerator
,
PROPF_METHOD
|
7
},
{
EvalErrorW
,
JSGlobal_EvalError
,
PROPF_CONSTR
|
1
},
{
_GetObjectW
,
JSGlobal_GetObject
,
PROPF_METHOD
|
2
},
{
RangeErrorW
,
JSGlobal_RangeError
,
PROPF_CONSTR
|
1
},
{
ReferenceErrorW
,
JSGlobal_ReferenceError
,
PROPF_CONSTR
|
1
},
{
RegExpErrorW
,
JSGlobal_RegExpError
,
PROPF_CONSTR
|
1
},
{
ScriptEngineW
,
JSGlobal_ScriptEngine
,
PROPF_METHOD
},
{
ScriptEngineBuildVersionW
,
JSGlobal_ScriptEngineBuildVersion
,
PROPF_METHOD
},
{
ScriptEngineMajorVersionW
,
JSGlobal_ScriptEngineMajorVersion
,
PROPF_METHOD
},
{
ScriptEngineMinorVersionW
,
JSGlobal_ScriptEngineMinorVersion
,
PROPF_METHOD
},
{
SyntaxErrorW
,
JSGlobal_SyntaxError
,
PROPF_CONSTR
|
1
},
{
TypeErrorW
,
JSGlobal_TypeError
,
PROPF_CONSTR
|
1
},
{
URIErrorW
,
JSGlobal_URIError
,
PROPF_CONSTR
|
1
},
{
decodeURIW
,
JSGlobal_decodeURI
,
PROPF_METHOD
|
1
},
{
decodeURIComponentW
,
JSGlobal_decodeURIComponent
,
PROPF_METHOD
|
1
},
{
encodeURIW
,
JSGlobal_encodeURI
,
PROPF_METHOD
|
1
},
...
...
@@ -1087,6 +1015,34 @@ static HRESULT init_constructors(script_ctx_t *ctx, jsdisp_t *object_prototype)
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
EvalErrorW
,
jsval_obj
(
ctx
->
eval_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
RangeErrorW
,
jsval_obj
(
ctx
->
range_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
ReferenceErrorW
,
jsval_obj
(
ctx
->
reference_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
RegExpErrorW
,
jsval_obj
(
ctx
->
regexp_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
SyntaxErrorW
,
jsval_obj
(
ctx
->
syntax_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
TypeErrorW
,
jsval_obj
(
ctx
->
type_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
jsdisp_propput_dontenum
(
ctx
->
global
,
URIErrorW
,
jsval_obj
(
ctx
->
uri_error_constr
));
if
(
FAILED
(
hres
))
return
hres
;
hres
=
create_number_constr
(
ctx
,
object_prototype
,
&
ctx
->
number_constr
);
if
(
FAILED
(
hres
))
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