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
ca2b797f
Commit
ca2b797f
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 global object implementation.
parent
2bbd9d41
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
2 deletions
+23
-2
Makefile.in
dlls/jscript/Makefile.in
+1
-0
engine.c
dlls/jscript/engine.c
+6
-1
global.c
dlls/jscript/global.c
+0
-0
jscript.c
dlls/jscript/jscript.c
+11
-0
jscript.h
dlls/jscript/jscript.h
+5
-1
No files found.
dlls/jscript/Makefile.in
View file @
ca2b797f
...
...
@@ -10,6 +10,7 @@ RC_SRCS = rsrc.rc
C_SRCS
=
\
dispex.c
\
engine.c
\
global.c
\
jscript.c
\
jscript_main.c
\
jsutils.c
\
...
...
dlls/jscript/engine.c
View file @
ca2b797f
...
...
@@ -203,7 +203,12 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, ex
TRACE
(
"%s
\n
"
,
debugstr_w
(
identifier
));
/* FIXME: scope chain */
/* FIXME: global */
hres
=
dispex_get_id
(
_IDispatchEx_
(
ctx
->
parser
->
script
->
global
),
identifier
,
0
,
&
id
);
if
(
SUCCEEDED
(
hres
))
{
exprval_set_idref
(
ret
,
(
IDispatch
*
)
_IDispatchEx_
(
ctx
->
parser
->
script
->
global
),
id
);
return
S_OK
;
}
for
(
item
=
ctx
->
parser
->
script
->
named_items
;
item
;
item
=
item
->
next
)
{
hres
=
disp_get_id
(
item
->
disp
,
identifier
,
0
,
&
id
);
...
...
dlls/jscript/global.c
0 → 100644
View file @
ca2b797f
This diff is collapsed.
Click to expand it.
dlls/jscript/jscript.c
View file @
ca2b797f
...
...
@@ -216,9 +216,15 @@ static HRESULT WINAPI JScript_SetScriptSite(IActiveScript *iface,
return
hres
;
}
if
(
!
This
->
ctx
->
script_disp
)
{
hres
=
create_dispex
(
This
->
ctx
,
NULL
,
NULL
,
&
This
->
ctx
->
script_disp
);
if
(
FAILED
(
hres
))
return
hres
;
}
hres
=
init_global
(
This
->
ctx
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
InterlockedCompareExchange
(
&
This
->
thread_id
,
GetCurrentThreadId
(),
0
))
return
E_UNEXPECTED
;
...
...
@@ -306,6 +312,11 @@ static HRESULT WINAPI JScript_Close(IActiveScript *iface)
IDispatchEx_Release
(
_IDispatchEx_
(
This
->
ctx
->
script_disp
));
This
->
ctx
->
script_disp
=
NULL
;
}
if
(
This
->
ctx
->
global
)
{
IDispatchEx_Release
(
_IDispatchEx_
(
This
->
ctx
->
global
));
This
->
ctx
->
global
=
NULL
;
}
}
if
(
This
->
site
)
{
...
...
dlls/jscript/jscript.h
View file @
ca2b797f
...
...
@@ -48,7 +48,8 @@ typedef struct DispatchEx DispatchEx;
#define PROPF_CONSTR 0x0400
typedef
enum
{
JSCLASS_NONE
JSCLASS_NONE
,
JSCLASS_GLOBAL
}
jsclass_t
;
typedef
HRESULT
(
*
builtin_invoke_t
)(
DispatchEx
*
,
LCID
,
WORD
,
DISPPARAMS
*
,
VARIANT
*
,
jsexcept_t
*
,
IServiceProvider
*
);
...
...
@@ -105,6 +106,7 @@ struct _script_ctx_t {
LCID
lcid
;
DispatchEx
*
script_disp
;
DispatchEx
*
global
;
};
void
script_release
(
script_ctx_t
*
);
...
...
@@ -114,6 +116,8 @@ static inline void script_addref(script_ctx_t *ctx)
ctx
->
ref
++
;
}
HRESULT
init_global
(
script_ctx_t
*
);
const
char
*
debugstr_variant
(
const
VARIANT
*
);
HRESULT
WINAPI
JScriptFactory_CreateInstance
(
IClassFactory
*
,
IUnknown
*
,
REFIID
,
void
**
);
...
...
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