summaryrefslogtreecommitdiff
path: root/fxjs/cfxjs_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cfxjs_engine.cpp')
-rw-r--r--fxjs/cfxjs_engine.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/fxjs/cfxjs_engine.cpp b/fxjs/cfxjs_engine.cpp
index f1dd45016e..c993a7dafa 100644
--- a/fxjs/cfxjs_engine.cpp
+++ b/fxjs/cfxjs_engine.cpp
@@ -15,6 +15,7 @@
#include "fxjs/cjs_object.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
+#include "v8/include/v8-util.h"
class CFXJS_PerObjectData;
@@ -590,6 +591,10 @@ void CFXJS_Engine::Error(const WideString& message) {
GetIsolate()->ThrowException(NewString(message.AsStringView()));
}
+v8::Local<v8::Context> CFXJS_Engine::GetV8Context() {
+ return v8::Local<v8::Context>::New(GetIsolate(), m_V8Context);
+}
+
// static
CJS_Object* CFXJS_Engine::GetObjectPrivate(v8::Local<v8::Object> pObj) {
auto* pData = CFXJS_PerObjectData::GetFromObject(pObj);