Index: xfa/fxjse/context.cpp |
diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp |
index 8eacc77a748cf6c6bd42c0b87cf13f425ec4f242..e5d5f994d52fa2b74e6ee4ed9c2c943e767c1d2e 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() { |