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
1b51a43a
Commit
1b51a43a
authored
Nov 05, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added SCRIPTITEM_ISVISIBLE flag implementation.
parent
73658a8b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
0 deletions
+21
-0
engine.c
dlls/jscript/engine.c
+10
-0
jscript.c
dlls/jscript/jscript.c
+8
-0
jscript.h
dlls/jscript/jscript.h
+1
-0
run.c
dlls/jscript/tests/run.c
+2
-0
No files found.
dlls/jscript/engine.c
View file @
1b51a43a
...
...
@@ -458,6 +458,16 @@ static HRESULT identifier_eval(exec_ctx_t *ctx, BSTR identifier, DWORD flags, ex
}
for
(
item
=
ctx
->
parser
->
script
->
named_items
;
item
;
item
=
item
->
next
)
{
if
((
item
->
flags
&
SCRIPTITEM_ISVISIBLE
)
&&
!
strcmpW
(
item
->
name
,
identifier
))
{
ret
->
type
=
EXPRVAL_VARIANT
;
V_VT
(
&
ret
->
u
.
var
)
=
VT_DISPATCH
;
V_DISPATCH
(
&
ret
->
u
.
var
)
=
item
->
disp
;
IDispatch_AddRef
(
item
->
disp
);
return
S_OK
;
}
}
for
(
item
=
ctx
->
parser
->
script
->
named_items
;
item
;
item
=
item
->
next
)
{
hres
=
disp_get_id
(
item
->
disp
,
identifier
,
0
,
&
id
);
if
(
SUCCEEDED
(
hres
))
break
;
...
...
dlls/jscript/jscript.c
View file @
1b51a43a
...
...
@@ -326,6 +326,7 @@ static HRESULT WINAPI JScript_Close(IActiveScript *iface)
iter2
=
iter
->
next
;
IDispatch_Release
(
iter
->
disp
);
heap_free
(
iter
->
name
);
heap_free
(
iter
);
iter
=
iter2
;
}
...
...
@@ -390,6 +391,13 @@ static HRESULT WINAPI JScript_AddNamedItem(IActiveScript *iface,
item
->
disp
=
disp
;
item
->
flags
=
dwFlags
;
item
->
name
=
heap_strdupW
(
pstrName
);
if
(
!
item
->
name
)
{
IDispatch_Release
(
disp
);
heap_free
(
item
);
return
E_OUTOFMEMORY
;
}
item
->
next
=
This
->
ctx
->
named_items
;
This
->
ctx
->
named_items
=
item
;
...
...
dlls/jscript/jscript.h
View file @
1b51a43a
...
...
@@ -154,6 +154,7 @@ HRESULT to_object(exec_ctx_t*,VARIANT*,IDispatch**);
typedef
struct
named_item_t
{
IDispatch
*
disp
;
DWORD
flags
;
LPWSTR
name
;
struct
named_item_t
*
next
;
}
named_item_t
;
...
...
dlls/jscript/tests/run.c
View file @
1b51a43a
...
...
@@ -702,6 +702,8 @@ static void run_tests(void)
parse_script_a
(
"delete testObj.deleteTest;"
);
CHECK_CALLED
(
testobj_delete
);
parse_script_a
(
"ok(typeof(test) === 'object',
\"
typeof(test) != 'object'
\"
);"
);
run_from_res
(
"lang.js"
);
run_from_res
(
"api.js"
);
run_from_res
(
"regexp.js"
);
...
...
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