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
652a0121
Commit
652a0121
authored
Sep 09, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added variable object handling.
parent
fc5a8836
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
engine.c
dlls/jscript/engine.c
+12
-3
engine.h
dlls/jscript/engine.h
+2
-1
jscript.c
dlls/jscript/jscript.c
+1
-1
No files found.
dlls/jscript/engine.c
View file @
652a0121
...
...
@@ -108,7 +108,7 @@ void scope_release(scope_chain_t *scope)
heap_free
(
scope
);
}
HRESULT
create_exec_ctx
(
scope_chain_t
*
scope
,
exec_ctx_t
**
ret
)
HRESULT
create_exec_ctx
(
DispatchEx
*
var_disp
,
scope_chain_t
*
scope
,
exec_ctx_t
**
ret
)
{
exec_ctx_t
*
ctx
;
...
...
@@ -116,6 +116,9 @@ HRESULT create_exec_ctx(scope_chain_t *scope, exec_ctx_t **ret)
if
(
!
ctx
)
return
E_OUTOFMEMORY
;
IDispatchEx_AddRef
(
_IDispatchEx_
(
var_disp
));
ctx
->
var_disp
=
var_disp
;
if
(
scope
)
{
scope_addref
(
scope
);
ctx
->
scope_chain
=
scope
;
...
...
@@ -132,6 +135,8 @@ void exec_release(exec_ctx_t *ctx)
if
(
ctx
->
scope_chain
)
scope_release
(
ctx
->
scope_chain
);
if
(
ctx
->
var_disp
)
IDispatchEx_Release
(
_IDispatchEx_
(
ctx
->
var_disp
));
heap_free
(
ctx
);
}
...
...
@@ -300,8 +305,12 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, ex
}
if
(
flags
&
EXPR_NEWREF
)
{
FIXME
(
"create ref
\n
"
);
return
E_NOTIMPL
;
hres
=
dispex_get_id
(
_IDispatchEx_
(
ctx
->
var_disp
),
identifier
,
fdexNameEnsure
,
&
id
);
if
(
FAILED
(
hres
))
return
hres
;
exprval_set_idref
(
ret
,
(
IDispatch
*
)
_IDispatchEx_
(
ctx
->
var_disp
),
id
);
return
S_OK
;
}
WARN
(
"Could not find identifier %s
\n
"
,
debugstr_w
(
identifier
));
...
...
dlls/jscript/engine.h
View file @
652a0121
...
...
@@ -75,6 +75,7 @@ struct _exec_ctx_t {
parser_ctx_t
*
parser
;
scope_chain_t
*
scope_chain
;
DispatchEx
*
var_disp
;
};
static
inline
void
exec_addref
(
exec_ctx_t
*
ctx
)
...
...
@@ -83,7 +84,7 @@ static inline void exec_addref(exec_ctx_t *ctx)
}
void
exec_release
(
exec_ctx_t
*
);
HRESULT
create_exec_ctx
(
scope_chain_t
*
,
exec_ctx_t
**
);
HRESULT
create_exec_ctx
(
DispatchEx
*
,
scope_chain_t
*
,
exec_ctx_t
**
);
HRESULT
exec_source
(
exec_ctx_t
*
,
parser_ctx_t
*
,
source_elements_t
*
,
jsexcept_t
*
,
VARIANT
*
);
typedef
struct
_statement_t
statement_t
;
...
...
dlls/jscript/jscript.c
View file @
652a0121
...
...
@@ -80,7 +80,7 @@ static HRESULT exec_global_code(JScript *This, parser_ctx_t *parser_ctx)
VARIANT
var
;
HRESULT
hres
;
hres
=
create_exec_ctx
(
NULL
,
&
exec_ctx
);
hres
=
create_exec_ctx
(
This
->
ctx
->
script_disp
,
NULL
,
&
exec_ctx
);
if
(
FAILED
(
hres
))
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