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
f46f9261
Commit
f46f9261
authored
Sep 07, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 07, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Addd jsdisp_addref helper function.
parent
ac8d2f1f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
9 deletions
+14
-9
array.c
dlls/jscript/array.c
+3
-3
dispex.c
dlls/jscript/dispex.c
+2
-2
engine.c
dlls/jscript/engine.c
+2
-2
function.c
dlls/jscript/function.c
+1
-1
global.c
dlls/jscript/global.c
+1
-1
jscript.h
dlls/jscript/jscript.h
+5
-0
No files found.
dlls/jscript/array.c
View file @
f46f9261
...
...
@@ -506,8 +506,8 @@ static HRESULT Array_reverse(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISP
}
if
(
retv
)
{
jsdisp_addref
(
jsthis
);
var_set_jsdisp
(
retv
,
jsthis
);
IDispatch_AddRef
(
V_DISPATCH
(
retv
));
}
return
S_OK
;
...
...
@@ -745,8 +745,8 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
if
(
cmp_func
)
jsdisp_release
(
cmp_func
);
if
(
retv
)
{
jsdisp_addref
(
jsthis
);
var_set_jsdisp
(
retv
,
jsthis
);
IDispatch_AddRef
(
V_DISPATCH
(
retv
));
}
return
S_OK
;
}
...
...
@@ -850,8 +850,8 @@ static HRESULT Array_sort(script_ctx_t *ctx, vdisp_t *vthis, WORD flags, DISPPAR
return
hres
;
if
(
retv
)
{
jsdisp_addref
(
jsthis
);
var_set_jsdisp
(
retv
,
jsthis
);
IDispatch_AddRef
(
V_DISPATCH
(
retv
));
}
return
S_OK
;
...
...
dlls/jscript/dispex.c
View file @
f46f9261
...
...
@@ -437,7 +437,7 @@ static HRESULT WINAPI DispatchEx_QueryInterface(IDispatchEx *iface, REFIID riid,
*
ppv
=
_IDispatchEx_
(
This
);
}
else
if
(
IsEqualGUID
(
&
IID_IDispatchJS
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatchJS %p)
\n
"
,
This
,
ppv
);
IUnknown_AddRef
(
_IDispatchEx_
(
This
)
);
jsdisp_addref
(
This
);
*
ppv
=
This
;
return
S_OK
;
}
else
{
...
...
@@ -755,7 +755,7 @@ HRESULT init_dispex(jsdisp_t *dispex, script_ctx_t *ctx, const builtin_info_t *b
dispex
->
prototype
=
prototype
;
if
(
prototype
)
IDispatchEx_AddRef
(
_IDispatchEx_
(
prototype
)
);
jsdisp_addref
(
prototype
);
dispex
->
prop_cnt
=
1
;
dispex
->
props
[
0
].
name
=
NULL
;
...
...
dlls/jscript/engine.c
View file @
f46f9261
...
...
@@ -143,7 +143,7 @@ HRESULT scope_push(scope_chain_t *scope, jsdisp_t *obj, scope_chain_t **ret)
new_scope
->
ref
=
1
;
IDispatchEx_AddRef
(
_IDispatchEx_
(
obj
)
);
jsdisp_addref
(
obj
);
new_scope
->
obj
=
obj
;
if
(
scope
)
{
...
...
@@ -197,7 +197,7 @@ HRESULT create_exec_ctx(script_ctx_t *script_ctx, IDispatch *this_obj, jsdisp_t
ctx
->
this_obj
=
to_disp
(
script_ctx
->
global
);
IDispatch_AddRef
(
ctx
->
this_obj
);
IDispatchEx_AddRef
(
_IDispatchEx_
(
var_disp
)
);
jsdisp_addref
(
var_disp
);
ctx
->
var_disp
=
var_disp
;
if
(
scope
)
{
...
...
dlls/jscript/function.c
View file @
f46f9261
...
...
@@ -547,7 +547,7 @@ static HRESULT Function_arguments(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
switch
(
flags
)
{
case
DISPATCH_PROPERTYGET
:
{
if
(
function
->
arguments
)
{
IDispatchEx_AddRef
(
_IDispatchEx_
(
function
->
arguments
)
);
jsdisp_addref
(
function
->
arguments
);
var_set_jsdisp
(
retv
,
function
->
arguments
);
}
else
{
V_VT
(
retv
)
=
VT_NULL
;
...
...
dlls/jscript/global.c
View file @
f46f9261
...
...
@@ -112,8 +112,8 @@ static HRESULT constructor_call(jsdisp_t *constr, WORD flags, DISPPARAMS *dp,
if
(
flags
!=
DISPATCH_PROPERTYGET
)
return
jsdisp_call_value
(
constr
,
flags
,
dp
,
retv
,
ei
,
sp
);
jsdisp_addref
(
constr
);
var_set_jsdisp
(
retv
,
constr
);
IDispatchEx_AddRef
(
_IDispatchEx_
(
constr
));
return
S_OK
;
}
...
...
dlls/jscript/jscript.h
View file @
f46f9261
...
...
@@ -192,6 +192,11 @@ static inline IDispatch *to_disp(jsdisp_t *jsdisp)
return
(
IDispatch
*
)
&
jsdisp
->
lpIDispatchExVtbl
;
}
static
inline
void
jsdisp_addref
(
jsdisp_t
*
jsdisp
)
{
IDispatchEx_AddRef
(
_IDispatchEx_
(
jsdisp
));
}
static
inline
void
jsdisp_release
(
jsdisp_t
*
jsdisp
)
{
IDispatchEx_Release
(
_IDispatchEx_
(
jsdisp
));
...
...
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