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
809a91b8
Commit
809a91b8
authored
Dec 08, 2022
by
Gabriel Ivăncescu
Committed by
Alexandre Julliard
Dec 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Implement CollectGarbage().
Signed-off-by:
Gabriel Ivăncescu
<
gabrielopcode@gmail.com
>
parent
e8ee6dda
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
global.c
dlls/jscript/global.c
+1
-4
run.c
dlls/jscript/tests/run.c
+20
-0
No files found.
dlls/jscript/global.c
View file @
809a91b8
...
@@ -549,10 +549,7 @@ static HRESULT JSGlobal_ScriptEngineBuildVersion(script_ctx_t *ctx, jsval_t vthi
...
@@ -549,10 +549,7 @@ static HRESULT JSGlobal_ScriptEngineBuildVersion(script_ctx_t *ctx, jsval_t vthi
static
HRESULT
JSGlobal_CollectGarbage
(
script_ctx_t
*
ctx
,
jsval_t
vthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
static
HRESULT
JSGlobal_CollectGarbage
(
script_ctx_t
*
ctx
,
jsval_t
vthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
jsval_t
*
r
)
jsval_t
*
r
)
{
{
static
int
once
=
0
;
return
gc_run
(
ctx
);
if
(
!
once
++
)
FIXME
(
": stub
\n
"
);
return
S_OK
;
}
}
static
HRESULT
JSGlobal_encodeURI
(
script_ctx_t
*
ctx
,
jsval_t
vthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
static
HRESULT
JSGlobal_encodeURI
(
script_ctx_t
*
ctx
,
jsval_t
vthis
,
WORD
flags
,
unsigned
argc
,
jsval_t
*
argv
,
...
...
dlls/jscript/tests/run.c
View file @
809a91b8
...
@@ -3452,6 +3452,7 @@ static void test_destructors(void)
...
@@ -3452,6 +3452,7 @@ static void test_destructors(void)
"a.ref = { 'ref': Math, 'a': a }; b.ref = Math.ref;
\n
"
"a.ref = { 'ref': Math, 'a': a }; b.ref = Math.ref;
\n
"
"a.self = a; b.self = b; c.self = c;
\n
"
"a.self = a; b.self = b; c.self = c;
\n
"
"})(), true"
;
"})(), true"
;
IActiveScriptParse
*
parser
;
IActiveScript
*
script
;
IActiveScript
*
script
;
VARIANT
v
;
VARIANT
v
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -3479,6 +3480,25 @@ static void test_destructors(void)
...
@@ -3479,6 +3480,25 @@ static void test_destructors(void)
CHECK_CALLED
(
testdestrobj
);
CHECK_CALLED
(
testdestrobj
);
IActiveScript_Release
(
script
);
IActiveScript_Release
(
script
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
parse_script_expr
(
cyclic_refs
,
&
v
,
&
script
);
ok
(
hres
==
S_OK
,
"parse_script_expr failed: %08lx
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
hres
=
IActiveScript_QueryInterface
(
script
,
&
IID_IActiveScriptParse
,
(
void
**
)
&
parser
);
ok
(
hres
==
S_OK
,
"Could not get IActiveScriptParse: %08lx
\n
"
,
hres
);
SET_EXPECT
(
testdestrobj
);
V_VT
(
&
v
)
=
VT_EMPTY
;
hres
=
IActiveScriptParse_ParseScriptText
(
parser
,
L"Math.ref = undefined, CollectGarbage(), true"
,
NULL
,
NULL
,
NULL
,
0
,
0
,
SCRIPTTEXT_ISEXPRESSION
,
&
v
,
NULL
);
ok
(
hres
==
S_OK
,
"ParseScriptText failed: %08lx
\n
"
,
hres
);
ok
(
V_VT
(
&
v
)
==
VT_BOOL
,
"V_VT(v) = %d
\n
"
,
V_VT
(
&
v
));
IActiveScriptParse_Release
(
parser
);
CHECK_CALLED
(
testdestrobj
);
IActiveScript_Release
(
script
);
}
}
static
void
test_eval
(
void
)
static
void
test_eval
(
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