diff options
Diffstat (limited to 'fxjs/cfxjs_engine_embeddertest.cpp')
-rw-r--r-- | fxjs/cfxjs_engine_embeddertest.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fxjs/cfxjs_engine_embeddertest.cpp b/fxjs/cfxjs_engine_embeddertest.cpp index ff866d3ee0..a9422ece98 100644 --- a/fxjs/cfxjs_engine_embeddertest.cpp +++ b/fxjs/cfxjs_engine_embeddertest.cpp @@ -51,10 +51,12 @@ TEST_F(CFXJSEngineEmbedderTest, MultipleEngines) { engine2.InitializeEngine(); v8::Context::Scope context_scope(GetV8Context()); - Optional<IJS_Runtime::JS_Error> err = engine()->Execute(WideString(kScript0)); - EXPECT_FALSE(err); - CheckAssignmentInEngineContext(engine(), kExpected0); - + { + Optional<IJS_Runtime::JS_Error> err = + engine()->Execute(WideString(kScript0)); + EXPECT_FALSE(err); + CheckAssignmentInEngineContext(engine(), kExpected0); + } { // engine1 executing in engine1's context doesn't affect main. v8::Context::Scope context_scope1(engine1.GetV8Context()); |