Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
561437ad
Commit
561437ad
authored
Aug 10, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed var handling.
parent
6afd5354
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
engine.c
dlls/jscript/engine.c
+8
-1
run.c
dlls/jscript/tests/run.c
+16
-0
No files found.
dlls/jscript/engine.c
View file @
561437ad
...
...
@@ -407,8 +407,15 @@ HRESULT exec_source(exec_ctx_t *ctx, parser_ctx_t *parser, source_elements_t *so
for
(
var
=
source
->
variables
;
var
;
var
=
var
->
next
)
{
DISPID
id
=
0
;
BSTR
name
;
hres
=
jsdisp_get_id
(
ctx
->
var_disp
,
var
->
identifier
,
fdexNameEnsure
,
&
id
);
name
=
SysAllocString
(
var
->
identifier
);
if
(
!
name
)
return
E_OUTOFMEMORY
;
if
(
!
lookup_global_members
(
parser
->
script
,
name
,
NULL
))
hres
=
jsdisp_get_id
(
ctx
->
var_disp
,
var
->
identifier
,
fdexNameEnsure
,
&
id
);
SysFreeString
(
name
);
if
(
FAILED
(
hres
))
return
hres
;
}
...
...
dlls/jscript/tests/run.c
View file @
561437ad
...
...
@@ -63,6 +63,7 @@ DEFINE_EXPECT(global_propput_d);
DEFINE_EXPECT
(
global_propput_i
);
DEFINE_EXPECT
(
global_success_d
);
DEFINE_EXPECT
(
global_success_i
);
DEFINE_EXPECT
(
global_notexists_d
);
DEFINE_EXPECT
(
testobj_delete
);
DEFINE_EXPECT
(
GetItemInfo_testVal
);
...
...
@@ -288,6 +289,11 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_NULL_BSTR
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"notExists"
))
{
CHECK_EXPECT
(
global_notexists_d
);
ok
(
grfdex
==
fdexNameCaseSensitive
,
"grfdex = %x
\n
"
,
grfdex
);
return
DISP_E_UNKNOWNNAME
;
}
if
(
strict_dispid_check
)
ok
(
0
,
"unexpected call %s
\n
"
,
debugstr_w
(
bstrName
));
...
...
@@ -837,6 +843,16 @@ static void run_tests(void)
parse_script_a
(
"function reportSuccess() {}; reportSuccess();"
);
SET_EXPECT
(
global_propget_d
);
parse_script_a
(
"var testPropGet"
);
CHECK_CALLED
(
global_propget_d
);
SET_EXPECT
(
global_notexists_d
);
parse_script_a
(
"var notExists; notExists = 1;"
);
CHECK_CALLED
(
global_notexists_d
);
parse_script_a
(
"function f() { var testPropGet; }"
);
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