summaryrefslogtreecommitdiff
path: root/xfa/fxjse/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxjse/context.cpp')
-rw-r--r--xfa/fxjse/context.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp
index 8eacc77a74..e5d5f994d5 100644
--- a/xfa/fxjse/context.cpp
+++ b/xfa/fxjse/context.cpp
@@ -157,13 +157,16 @@ CFXJSE_Context::CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
CFXJSE_Context::~CFXJSE_Context() {}
-void CFXJSE_Context::GetGlobalObject(CFXJSE_Value* pValue) {
- ASSERT(pValue);
+std::unique_ptr<CFXJSE_Value> CFXJSE_Context::GetGlobalObject() {
+ std::unique_ptr<CFXJSE_Value> pValue(new CFXJSE_Value(m_pIsolate));
+
CFXJSE_ScopeUtil_IsolateHandleContext scope(this);
v8::Local<v8::Context> hContext =
v8::Local<v8::Context>::New(m_pIsolate, m_hContext);
v8::Local<v8::Object> hGlobalObject = hContext->Global();
pValue->ForceSetValue(hGlobalObject);
+
+ return pValue;
}
void CFXJSE_Context::EnableCompatibleMode() {