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
3bf7255d
Commit
3bf7255d
authored
Mar 27, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added to_flat_string helper and use it to access string buffer in activex.c.
parent
343122a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
activex.c
dlls/jscript/activex.c
+5
-4
jscript.h
dlls/jscript/jscript.h
+1
-0
jsutils.c
dlls/jscript/jsutils.c
+17
-0
No files found.
dlls/jscript/activex.c
View file @
3bf7255d
...
@@ -143,7 +143,8 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid)
...
@@ -143,7 +143,8 @@ static IUnknown *create_activex_object(script_ctx_t *ctx, const WCHAR *progid)
static
HRESULT
ActiveXObject_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
static
HRESULT
ActiveXObject_value
(
script_ctx_t
*
ctx
,
vdisp_t
*
jsthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
jsval_t
*
r
)
{
{
jsstr_t
*
progid
;
jsstr_t
*
progid_str
;
const
WCHAR
*
progid
;
IDispatch
*
disp
;
IDispatch
*
disp
;
IUnknown
*
obj
;
IUnknown
*
obj
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -166,12 +167,12 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
...
@@ -166,12 +167,12 @@ static HRESULT ActiveXObject_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
hres
=
to_
string
(
ctx
,
argv
[
0
]
,
&
progid
);
hres
=
to_
flat_string
(
ctx
,
argv
[
0
],
&
progid_str
,
&
progid
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
obj
=
create_activex_object
(
ctx
,
progid
->
str
);
obj
=
create_activex_object
(
ctx
,
progid
);
jsstr_release
(
progid
);
jsstr_release
(
progid
_str
);
if
(
!
obj
)
if
(
!
obj
)
return
throw_generic_error
(
ctx
,
JS_E_CANNOT_CREATE_OBJ
,
NULL
);
return
throw_generic_error
(
ctx
,
JS_E_CANNOT_CREATE_OBJ
,
NULL
);
...
...
dlls/jscript/jscript.h
View file @
3bf7255d
...
@@ -322,6 +322,7 @@ HRESULT to_integer(script_ctx_t*,jsval_t,double*) DECLSPEC_HIDDEN;
...
@@ -322,6 +322,7 @@ HRESULT to_integer(script_ctx_t*,jsval_t,double*) DECLSPEC_HIDDEN;
HRESULT
to_int32
(
script_ctx_t
*
,
jsval_t
,
INT
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_int32
(
script_ctx_t
*
,
jsval_t
,
INT
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_uint32
(
script_ctx_t
*
,
jsval_t
,
UINT32
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_uint32
(
script_ctx_t
*
,
jsval_t
,
UINT32
*
)
DECLSPEC_HIDDEN
;
HRESULT
to_string
(
script_ctx_t
*
,
jsval_t
,
jsstr_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
to_string
(
script_ctx_t
*
,
jsval_t
,
jsstr_t
**
)
DECLSPEC_HIDDEN
;
HRESULT
to_flat_string
(
script_ctx_t
*
,
jsval_t
,
jsstr_t
**
,
const
WCHAR
**
)
DECLSPEC_HIDDEN
;
HRESULT
to_object
(
script_ctx_t
*
,
jsval_t
,
IDispatch
**
)
DECLSPEC_HIDDEN
;
HRESULT
to_object
(
script_ctx_t
*
,
jsval_t
,
IDispatch
**
)
DECLSPEC_HIDDEN
;
HRESULT
variant_change_type
(
script_ctx_t
*
,
VARIANT
*
,
VARIANT
*
,
VARTYPE
)
DECLSPEC_HIDDEN
;
HRESULT
variant_change_type
(
script_ctx_t
*
,
VARIANT
*
,
VARIANT
*
,
VARTYPE
)
DECLSPEC_HIDDEN
;
...
...
dlls/jscript/jsutils.c
View file @
3bf7255d
...
@@ -776,6 +776,23 @@ HRESULT to_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str)
...
@@ -776,6 +776,23 @@ HRESULT to_string(script_ctx_t *ctx, jsval_t val, jsstr_t **str)
return
*
str
?
S_OK
:
E_OUTOFMEMORY
;
return
*
str
?
S_OK
:
E_OUTOFMEMORY
;
}
}
HRESULT
to_flat_string
(
script_ctx_t
*
ctx
,
jsval_t
val
,
jsstr_t
**
str
,
const
WCHAR
**
ret_str
)
{
HRESULT
hres
;
hres
=
to_string
(
ctx
,
val
,
str
);
if
(
FAILED
(
hres
))
return
hres
;
*
ret_str
=
jsstr_flatten
(
*
str
);
if
(
!*
ret_str
)
{
jsstr_release
(
*
str
);
return
E_OUTOFMEMORY
;
}
return
S_OK
;
}
/* ECMA-262 3rd Edition 9.9 */
/* ECMA-262 3rd Edition 9.9 */
HRESULT
to_object
(
script_ctx_t
*
ctx
,
jsval_t
val
,
IDispatch
**
disp
)
HRESULT
to_object
(
script_ctx_t
*
ctx
,
jsval_t
val
,
IDispatch
**
disp
)
{
{
...
...
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