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
2fc71ab6
Commit
2fc71ab6
authored
Sep 17, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Always use jsval-based to_uint32 implementation.
parent
0bab034f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
33 deletions
+6
-33
array.c
dlls/jscript/array.c
+1
-1
engine.c
dlls/jscript/engine.c
+1
-1
function.c
dlls/jscript/function.c
+1
-1
jscript.h
dlls/jscript/jscript.h
+1
-2
jsutils.c
dlls/jscript/jsutils.c
+1
-27
string.c
dlls/jscript/string.c
+1
-1
No files found.
dlls/jscript/array.c
View file @
2fc71ab6
...
...
@@ -79,7 +79,7 @@ static HRESULT get_length(script_ctx_t *ctx, vdisp_t *vdisp, jsexcept_t *ei, jsd
if
(
FAILED
(
hres
))
return
hres
;
hres
=
to_uint32
_jsval
(
ctx
,
val
,
ei
,
ret
);
hres
=
to_uint32
(
ctx
,
val
,
ei
,
ret
);
jsval_release
(
val
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/engine.c
View file @
2fc71ab6
...
...
@@ -160,7 +160,7 @@ static inline HRESULT stack_pop_int(exec_ctx_t *ctx, INT *r)
static
inline
HRESULT
stack_pop_uint
(
exec_ctx_t
*
ctx
,
DWORD
*
r
)
{
return
to_uint32
_jsval
(
ctx
->
script
,
stack_pop
(
ctx
),
ctx
->
ei
,
r
);
return
to_uint32
(
ctx
->
script
,
stack_pop
(
ctx
),
ctx
->
ei
,
r
);
}
static
inline
IDispatch
*
stack_pop_objid
(
exec_ctx_t
*
ctx
,
DISPID
*
id
)
...
...
dlls/jscript/function.c
View file @
2fc71ab6
...
...
@@ -347,7 +347,7 @@ static HRESULT array_to_args(script_ctx_t *ctx, jsdisp_t *arg_array, jsexcept_t
if
(
FAILED
(
hres
))
return
hres
;
hres
=
to_uint32
_jsval
(
ctx
,
val
,
ei
,
&
length
);
hres
=
to_uint32
(
ctx
,
val
,
ei
,
&
length
);
jsval_release
(
val
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/jscript/jscript.h
View file @
2fc71ab6
...
...
@@ -259,8 +259,7 @@ HRESULT to_boolean(jsval_t,BOOL*) DECLSPEC_HIDDEN;
HRESULT
to_number
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
double
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_integer
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
double
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_int32
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
INT
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_uint32
(
script_ctx_t
*
,
VARIANT
*
,
jsexcept_t
*
,
DWORD
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_uint32_jsval
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
DWORD
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_uint32
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
DWORD
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_string
(
script_ctx_t
*
,
VARIANT
*
,
jsexcept_t
*
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_string_jsval
(
script_ctx_t
*
,
jsval_t
,
jsexcept_t
*
,
BSTR
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_object
(
script_ctx_t
*
,
VARIANT
*
,
IDispatch
**
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/jsutils.c
View file @
2fc71ab6
...
...
@@ -645,23 +645,12 @@ HRESULT to_int32(script_ctx_t *ctx, jsval_t v, jsexcept_t *ei, INT *ret)
}
/* ECMA-262 3rd Edition 9.6 */
HRESULT
to_uint32
(
script_ctx_t
*
ctx
,
VARIANT
*
v
,
jsexcept_t
*
ei
,
DWORD
*
ret
)
HRESULT
to_uint32
(
script_ctx_t
*
ctx
,
jsval_t
val
,
jsexcept_t
*
ei
,
DWORD
*
ret
)
{
jsval_t
val
;
double
n
;
HRESULT
hres
;
if
(
V_VT
(
v
)
==
VT_I4
)
{
*
ret
=
V_I4
(
v
);
return
S_OK
;
}
hres
=
variant_to_jsval
(
v
,
&
val
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
to_number
(
ctx
,
val
,
ei
,
&
n
);
jsval_release
(
val
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
@@ -669,21 +658,6 @@ HRESULT to_uint32(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, DWORD *ret)
return
S_OK
;
}
/* ECMA-262 3rd Edition 9.6 */
HRESULT
to_uint32_jsval
(
script_ctx_t
*
ctx
,
jsval_t
v
,
jsexcept_t
*
ei
,
DWORD
*
ret
)
{
VARIANT
var
;
HRESULT
hres
;
hres
=
jsval_to_variant
(
v
,
&
var
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
to_uint32
(
ctx
,
&
var
,
ei
,
ret
);
VariantClear
(
&
var
);
return
hres
;
}
static
BSTR
int_to_bstr
(
int
i
)
{
WCHAR
buf
[
12
],
*
p
;
...
...
dlls/jscript/string.c
View file @
2fc71ab6
...
...
@@ -1531,7 +1531,7 @@ static HRESULT StringConstr_fromCharCode(script_ctx_t *ctx, vdisp_t *jsthis, WOR
return
E_OUTOFMEMORY
;
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
hres
=
to_uint32
_jsval
(
ctx
,
argv
[
i
],
ei
,
&
code
);
hres
=
to_uint32
(
ctx
,
argv
[
i
],
ei
,
&
code
);
if
(
FAILED
(
hres
))
{
SysFreeString
(
ret
);
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