summaryrefslogtreecommitdiff
path: root/fxjs/fxjs_v8.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/fxjs_v8.cpp')
-rw-r--r--fxjs/fxjs_v8.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fxjs/fxjs_v8.cpp b/fxjs/fxjs_v8.cpp
index e73ab0a8f0..4c9c5602d2 100644
--- a/fxjs/fxjs_v8.cpp
+++ b/fxjs/fxjs_v8.cpp
@@ -423,13 +423,13 @@ void CFXJS_Engine::InitializeEngine() {
}
}
}
- ResetPersistentContext(v8Context);
+ m_V8Context.Reset(GetIsolate(), v8Context);
}
void CFXJS_Engine::ReleaseEngine() {
v8::Isolate::Scope isolate_scope(GetIsolate());
v8::HandleScope handle_scope(GetIsolate());
- v8::Local<v8::Context> context = NewLocalContext();
+ v8::Local<v8::Context> context = GetV8Context();
v8::Context::Scope context_scope(context);
FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(GetIsolate());
if (!pData)
@@ -457,7 +457,7 @@ void CFXJS_Engine::ReleaseEngine() {
}
}
- ReleasePersistentContext();
+ m_V8Context.Reset();
if (GetIsolate() == g_isolate && --g_isolate_ref_count > 0)
return;