History

Add missing scope guards in script engine tests

Dale Glass committed 6 months ago

Commit 95f600f1 parent c249d712 files · +16 −5Browse files

Showing the changes to tests/script-engine/src/ScriptEngineBenchmarkTests.cpp (1 of 2 files). Show all

Unified · Split

tests/script-engine/src/ScriptEngineBenchmarkTests.cpp+7−0
@@ -106,6 +106,7 @@ void ScriptEngineBenchmarkTests::benchmarkSetProperty() { · 105 unmodified lines
106106 auto sm = makeManager("print(\"script works!\"); Script.stop(true);", "testTrivial.js");
107107
108108 auto engine = sm->engine();
109+ auto scopeGuard = engine->getScopeGuard();
109110 auto obj = engine->newObject();
110111
111112 QBENCHMARK {
@@ -119,6 +120,8 @@ void ScriptEngineBenchmarkTests::benchmarkSetProperty1K() { · 7 unmodified lines
119120 auto sm = makeManager("print(\"script works!\"); Script.stop(true);", "testTrivial.js");
120121
121122 auto engine = sm->engine();
123+ auto scopeGuard = engine->getScopeGuard();
124+
122125 auto obj = engine->newObject();
123126
124127 int i = 0;
@@ -138,6 +141,8 @@ void ScriptEngineBenchmarkTests::benchmarkSetProperty16K() { · 13 unmodified lines
138141 auto sm = makeManager("print(\"script works!\"); Script.stop(true);", "testTrivial.js");
139142
140143 auto engine = sm->engine();
144+ auto scopeGuard = engine->getScopeGuard();
145+
141146 auto obj = engine->newObject();
142147
143148 int i = 0;
@@ -158,6 +163,8 @@ void ScriptEngineBenchmarkTests::benchmarkQueryProperty() { · 14 unmodified lines
158163 auto sm = makeManager("print(\"script works!\"); Script.stop(true);", "testTrivial.js");
159164
160165 auto engine = sm->engine();
166+ auto scopeGuard = engine->getScopeGuard();
167+
161168 auto obj = engine->newObject();
162169
163170