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
5a787b3a
Commit
5a787b3a
authored
Oct 18, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added VBArray handling to to_object().
parent
29cdb212
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
+26
-3
jscript.h
dlls/jscript/jscript.h
+1
-0
jsutils.c
dlls/jscript/jsutils.c
+7
-0
api.js
dlls/jscript/tests/api.js
+3
-3
vbarray.c
dlls/jscript/vbarray.c
+15
-0
No files found.
dlls/jscript/jscript.h
View file @
5a787b3a
...
@@ -243,6 +243,7 @@ HRESULT create_regexp_var(script_ctx_t*,VARIANT*,VARIANT*,jsdisp_t**);
...
@@ -243,6 +243,7 @@ HRESULT create_regexp_var(script_ctx_t*,VARIANT*,VARIANT*,jsdisp_t**);
HRESULT
create_string
(
script_ctx_t
*
,
const
WCHAR
*
,
DWORD
,
jsdisp_t
**
);
HRESULT
create_string
(
script_ctx_t
*
,
const
WCHAR
*
,
DWORD
,
jsdisp_t
**
);
HRESULT
create_bool
(
script_ctx_t
*
,
VARIANT_BOOL
,
jsdisp_t
**
);
HRESULT
create_bool
(
script_ctx_t
*
,
VARIANT_BOOL
,
jsdisp_t
**
);
HRESULT
create_number
(
script_ctx_t
*
,
VARIANT
*
,
jsdisp_t
**
);
HRESULT
create_number
(
script_ctx_t
*
,
VARIANT
*
,
jsdisp_t
**
);
HRESULT
create_vbarray
(
script_ctx_t
*
,
SAFEARRAY
*
,
jsdisp_t
**
);
typedef
enum
{
typedef
enum
{
NO_HINT
,
NO_HINT
,
...
...
dlls/jscript/jsutils.c
View file @
5a787b3a
...
@@ -633,6 +633,13 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
...
@@ -633,6 +633,13 @@ HRESULT to_object(script_ctx_t *ctx, VARIANT *v, IDispatch **disp)
*
disp
=
to_disp
(
dispex
);
*
disp
=
to_disp
(
dispex
);
break
;
break
;
case
VT_ARRAY
|
VT_VARIANT
:
hres
=
create_vbarray
(
ctx
,
V_ARRAY
(
v
),
&
dispex
);
if
(
FAILED
(
hres
))
return
hres
;
*
disp
=
to_disp
(
dispex
);
break
;
default:
default:
FIXME
(
"unsupported vt %d
\n
"
,
V_VT
(
v
));
FIXME
(
"unsupported vt %d
\n
"
,
V_VT
(
v
));
return
E_NOTIMPL
;
return
E_NOTIMPL
;
...
...
dlls/jscript/tests/api.js
View file @
5a787b3a
...
@@ -1901,11 +1901,11 @@ exception_test(function() {new null;}, "TypeError", -2146823281);
...
@@ -1901,11 +1901,11 @@ exception_test(function() {new null;}, "TypeError", -2146823281);
exception_test
(
function
()
{
new
nullDisp
;},
"TypeError"
,
-
2146827850
);
exception_test
(
function
()
{
new
nullDisp
;},
"TypeError"
,
-
2146827850
);
exception_test
(
function
()
{
new
VBArray
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
new
VBArray
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
new
VBArray
(
new
VBArray
(
createArray
()));},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
new
VBArray
(
new
VBArray
(
createArray
()));},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
(
new
VBArray
(
createArray
())
).
lbound
(
"aaa"
);},
"RangeError"
,
-
2146828279
);
exception_test
(
function
()
{
createArray
(
).
lbound
(
"aaa"
);},
"RangeError"
,
-
2146828279
);
exception_test
(
function
()
{
(
new
VBArray
(
createArray
())
).
lbound
(
3
);},
"RangeError"
,
-
2146828279
);
exception_test
(
function
()
{
createArray
(
).
lbound
(
3
);},
"RangeError"
,
-
2146828279
);
exception_test
(
function
()
{
tmp
=
new
Object
();
tmp
.
lb
=
VBArray
.
prototype
.
lbound
;
tmp
.
lb
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
tmp
=
new
Object
();
tmp
.
lb
=
VBArray
.
prototype
.
lbound
;
tmp
.
lb
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
tmp
=
new
Object
();
tmp
.
lb
=
VBArray
.
prototype
.
lbound
;
tmp
.
lb
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
tmp
=
new
Object
();
tmp
.
lb
=
VBArray
.
prototype
.
lbound
;
tmp
.
lb
();},
"TypeError"
,
-
2146823275
);
exception_test
(
function
()
{
(
new
VBArray
(
createArray
())
).
getItem
(
3
);},
"RangeError"
,
-
2146828279
);
exception_test
(
function
()
{
createArray
(
).
getItem
(
3
);},
"RangeError"
,
-
2146828279
);
function
testThisExcept
(
func
,
number
)
{
function
testThisExcept
(
func
,
number
)
{
exception_test
(
function
()
{
func
.
call
(
new
Object
())},
"TypeError"
,
number
);
exception_test
(
function
()
{
func
.
call
(
new
Object
())},
"TypeError"
,
number
);
...
...
dlls/jscript/vbarray.c
View file @
5a787b3a
...
@@ -325,3 +325,18 @@ HRESULT create_vbarray_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsd
...
@@ -325,3 +325,18 @@ HRESULT create_vbarray_constr(script_ctx_t *ctx, jsdisp_t *object_prototype, jsd
jsdisp_release
(
&
vbarray
->
dispex
);
jsdisp_release
(
&
vbarray
->
dispex
);
return
hres
;
return
hres
;
}
}
HRESULT
create_vbarray
(
script_ctx_t
*
ctx
,
SAFEARRAY
*
sa
,
jsdisp_t
**
ret
)
{
VBArrayInstance
*
vbarray
;
HRESULT
hres
;
hres
=
alloc_vbarray
(
ctx
,
NULL
,
&
vbarray
);
if
(
FAILED
(
hres
))
return
hres
;
SafeArrayCopy
(
sa
,
&
vbarray
->
safearray
);
*
ret
=
&
vbarray
->
dispex
;
return
S_OK
;
}
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