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
29b9237c
Commit
29b9237c
authored
Mar 12, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Removed no longer needed caller argument from jsdisp_get_idx.
parent
0d9cc454
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
25 deletions
+23
-25
array.c
dlls/jscript/array.c
+17
-18
dispex.c
dlls/jscript/dispex.c
+2
-2
function.c
dlls/jscript/function.c
+3
-4
jscript.h
dlls/jscript/jscript.h
+1
-1
No files found.
dlls/jscript/array.c
View file @
29b9237c
...
...
@@ -161,15 +161,14 @@ static HRESULT Array_length(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
return
S_OK
;
}
static
HRESULT
concat_array
(
jsdisp_t
*
array
,
ArrayInstance
*
obj
,
DWORD
*
len
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
static
HRESULT
concat_array
(
jsdisp_t
*
array
,
ArrayInstance
*
obj
,
DWORD
*
len
,
jsexcept_t
*
ei
)
{
VARIANT
var
;
DWORD
i
;
HRESULT
hres
;
for
(
i
=
0
;
i
<
obj
->
length
;
i
++
)
{
hres
=
jsdisp_get_idx
(
&
obj
->
dispex
,
i
,
&
var
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
&
obj
->
dispex
,
i
,
&
var
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
continue
;
if
(
FAILED
(
hres
))
...
...
@@ -185,7 +184,7 @@ static HRESULT concat_array(jsdisp_t *array, ArrayInstance *obj, DWORD *len,
return
S_OK
;
}
static
HRESULT
concat_obj
(
jsdisp_t
*
array
,
IDispatch
*
obj
,
DWORD
*
len
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
static
HRESULT
concat_obj
(
jsdisp_t
*
array
,
IDispatch
*
obj
,
DWORD
*
len
,
jsexcept_t
*
ei
)
{
jsdisp_t
*
jsobj
;
VARIANT
var
;
...
...
@@ -194,7 +193,7 @@ static HRESULT concat_obj(jsdisp_t *array, IDispatch *obj, DWORD *len, jsexcept_
jsobj
=
iface_to_jsdisp
((
IUnknown
*
)
obj
);
if
(
jsobj
)
{
if
(
is_class
(
jsobj
,
JSCLASS_ARRAY
))
{
hres
=
concat_array
(
array
,
(
ArrayInstance
*
)
jsobj
,
len
,
ei
,
caller
);
hres
=
concat_array
(
array
,
(
ArrayInstance
*
)
jsobj
,
len
,
ei
);
jsdisp_release
(
jsobj
);
return
hres
;
}
...
...
@@ -219,7 +218,7 @@ static HRESULT Array_concat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
if
(
FAILED
(
hres
))
return
hres
;
hres
=
concat_obj
(
ret
,
jsthis
->
u
.
disp
,
&
len
,
ei
,
caller
);
hres
=
concat_obj
(
ret
,
jsthis
->
u
.
disp
,
&
len
,
ei
);
if
(
SUCCEEDED
(
hres
))
{
VARIANT
*
arg
;
DWORD
i
;
...
...
@@ -227,7 +226,7 @@ static HRESULT Array_concat(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DISP
for
(
i
=
0
;
i
<
arg_cnt
(
dp
);
i
++
)
{
arg
=
get_arg
(
dp
,
i
);
if
(
V_VT
(
arg
)
==
VT_DISPATCH
)
hres
=
concat_obj
(
ret
,
V_DISPATCH
(
arg
),
&
len
,
ei
,
caller
);
hres
=
concat_obj
(
ret
,
V_DISPATCH
(
arg
),
&
len
,
ei
);
else
hres
=
jsdisp_propput_idx
(
ret
,
len
++
,
arg
,
ei
);
if
(
FAILED
(
hres
))
...
...
@@ -268,7 +267,7 @@ static HRESULT array_join(script_ctx_t *ctx, jsdisp_t *array, DWORD length, cons
return
E_OUTOFMEMORY
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
hres
=
jsdisp_get_idx
(
array
,
i
,
&
var
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
array
,
i
,
&
var
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
hres
=
S_OK
;
continue
;
...
...
@@ -401,7 +400,7 @@ static HRESULT Array_pop(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPARA
}
length
--
;
hres
=
jsdisp_get_idx
(
jsthis
,
length
,
&
val
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
length
,
&
val
,
ei
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
jsdisp_delete_idx
(
jsthis
,
length
);
}
else
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
...
...
@@ -476,11 +475,11 @@ static HRESULT Array_reverse(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
for
(
k
=
0
;
k
<
length
/
2
;
k
++
)
{
l
=
length
-
k
-
1
;
hres1
=
jsdisp_get_idx
(
jsthis
,
k
,
&
v1
,
ei
,
sp
);
hres1
=
jsdisp_get_idx
(
jsthis
,
k
,
&
v1
,
ei
);
if
(
FAILED
(
hres1
)
&&
hres1
!=
DISP_E_UNKNOWNNAME
)
return
hres1
;
hres2
=
jsdisp_get_idx
(
jsthis
,
l
,
&
v2
,
ei
,
sp
);
hres2
=
jsdisp_get_idx
(
jsthis
,
l
,
&
v2
,
ei
);
if
(
FAILED
(
hres2
)
&&
hres2
!=
DISP_E_UNKNOWNNAME
)
{
VariantClear
(
&
v1
);
return
hres2
;
...
...
@@ -543,14 +542,14 @@ static HRESULT Array_shift(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPA
return
S_OK
;
}
hres
=
jsdisp_get_idx
(
jsthis
,
0
,
&
ret
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
0
,
&
ret
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
V_VT
(
&
ret
)
=
VT_EMPTY
;
hres
=
S_OK
;
}
for
(
i
=
1
;
SUCCEEDED
(
hres
)
&&
i
<
length
;
i
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
i
,
&
v
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
i
,
&
v
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
hres
=
jsdisp_delete_idx
(
jsthis
,
i
-
1
);
else
if
(
SUCCEEDED
(
hres
))
...
...
@@ -625,7 +624,7 @@ static HRESULT Array_slice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPA
return
hres
;
for
(
idx
=
start
;
idx
<
end
;
idx
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
idx
,
&
v
,
ei
,
sp
);
hres
=
jsdisp_get_idx
(
jsthis
,
idx
,
&
v
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
continue
;
...
...
@@ -756,7 +755,7 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
vtab
=
heap_alloc_zero
(
length
*
sizeof
(
VARIANT
));
if
(
vtab
)
{
for
(
i
=
0
;
i
<
length
;
i
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
i
,
vtab
+
i
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
i
,
vtab
+
i
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
{
V_VT
(
vtab
+
i
)
=
VT_EMPTY
;
hres
=
S_OK
;
...
...
@@ -911,7 +910,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
return
hres
;
for
(
i
=
0
;
SUCCEEDED
(
hres
)
&&
i
<
delete_cnt
;
i
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
start
+
i
,
&
v
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
start
+
i
,
&
v
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
hres
=
S_OK
;
else
if
(
SUCCEEDED
(
hres
))
...
...
@@ -928,7 +927,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
if
(
add_args
<
delete_cnt
)
{
for
(
i
=
start
;
SUCCEEDED
(
hres
)
&&
i
<
length
-
delete_cnt
;
i
++
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
i
+
delete_cnt
,
&
v
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
i
+
delete_cnt
,
&
v
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
hres
=
jsdisp_delete_idx
(
jsthis
,
i
+
add_args
);
else
if
(
SUCCEEDED
(
hres
))
...
...
@@ -939,7 +938,7 @@ static HRESULT Array_splice(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPP
hres
=
jsdisp_delete_idx
(
jsthis
,
i
-
1
);
}
else
if
(
add_args
>
delete_cnt
)
{
for
(
i
=
length
-
delete_cnt
;
SUCCEEDED
(
hres
)
&&
i
!=
start
;
i
--
)
{
hres
=
jsdisp_get_idx
(
jsthis
,
i
+
delete_cnt
-
1
,
&
v
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
jsthis
,
i
+
delete_cnt
-
1
,
&
v
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
hres
=
jsdisp_delete_idx
(
jsthis
,
i
+
add_args
-
1
);
else
if
(
SUCCEEDED
(
hres
))
...
...
dlls/jscript/dispex.c
View file @
29b9237c
...
...
@@ -1148,7 +1148,7 @@ HRESULT jsdisp_propget_name(jsdisp_t *obj, const WCHAR *name, VARIANT *var, jsex
return
prop_get
(
obj
,
prop
,
&
dp
,
var
,
ei
,
NULL
);
}
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
obj
,
DWORD
idx
,
VARIANT
*
var
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
)
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
obj
,
DWORD
idx
,
VARIANT
*
var
,
jsexcept_t
*
ei
)
{
WCHAR
name
[
12
];
DISPPARAMS
dp
=
{
NULL
,
NULL
,
0
,
0
};
...
...
@@ -1167,7 +1167,7 @@ HRESULT jsdisp_get_idx(jsdisp_t *obj, DWORD idx, VARIANT *var, jsexcept_t *ei, I
if
(
!
prop
||
prop
->
type
==
PROP_DELETED
)
return
DISP_E_UNKNOWNNAME
;
return
prop_get
(
obj
,
prop
,
&
dp
,
var
,
ei
,
caller
);
return
prop_get
(
obj
,
prop
,
&
dp
,
var
,
ei
,
NULL
);
}
HRESULT
jsdisp_propget
(
jsdisp_t
*
jsdisp
,
DISPID
id
,
VARIANT
*
val
,
jsexcept_t
*
ei
)
...
...
dlls/jscript/function.c
View file @
29b9237c
...
...
@@ -357,8 +357,7 @@ static HRESULT Function_toString(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
return
S_OK
;
}
static
HRESULT
array_to_args
(
script_ctx_t
*
ctx
,
jsdisp_t
*
arg_array
,
jsexcept_t
*
ei
,
IServiceProvider
*
caller
,
DISPPARAMS
*
args
)
static
HRESULT
array_to_args
(
script_ctx_t
*
ctx
,
jsdisp_t
*
arg_array
,
jsexcept_t
*
ei
,
DISPPARAMS
*
args
)
{
VARIANT
var
,
*
argv
;
DWORD
length
,
i
;
...
...
@@ -378,7 +377,7 @@ static HRESULT array_to_args(script_ctx_t *ctx, jsdisp_t *arg_array, jsexcept_t
return
E_OUTOFMEMORY
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
hres
=
jsdisp_get_idx
(
arg_array
,
i
,
argv
+
i
,
ei
,
caller
);
hres
=
jsdisp_get_idx
(
arg_array
,
i
,
argv
+
i
,
ei
);
if
(
hres
==
DISP_E_UNKNOWNNAME
)
V_VT
(
argv
+
i
)
=
VT_EMPTY
;
else
if
(
FAILED
(
hres
))
{
...
...
@@ -432,7 +431,7 @@ static HRESULT Function_apply(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, DI
}
if
(
arg_array
)
{
hres
=
array_to_args
(
ctx
,
arg_array
,
ei
,
caller
,
&
args
);
hres
=
array_to_args
(
ctx
,
arg_array
,
ei
,
&
args
);
jsdisp_release
(
arg_array
);
}
else
{
FIXME
(
"throw TypeError
\n
"
);
...
...
dlls/jscript/jscript.h
View file @
29b9237c
...
...
@@ -217,7 +217,7 @@ HRESULT jsdisp_propput_name(jsdisp_t*,const WCHAR*,VARIANT*,jsexcept_t*) DECLSPE
HRESULT
jsdisp_propput_const
(
jsdisp_t
*
,
const
WCHAR
*
,
VARIANT
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propput_idx
(
jsdisp_t
*
,
DWORD
,
VARIANT
*
,
jsexcept_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_propget_name
(
jsdisp_t
*
,
LPCWSTR
,
VARIANT
*
,
jsexcept_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
,
DWORD
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_idx
(
jsdisp_t
*
,
DWORD
,
VARIANT
*
,
jsexcept_t
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_get_id
(
jsdisp_t
*
,
const
WCHAR
*
,
DWORD
,
DISPID
*
)
DECLSPEC_HIDDEN
;
HRESULT
jsdisp_delete_idx
(
jsdisp_t
*
,
DWORD
)
DECLSPEC_HIDDEN
;
VARIANT_BOOL
jsdisp_is_own_prop
(
jsdisp_t
*
obj
,
BSTR
name
)
DECLSPEC_HIDDEN
;
...
...
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