Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Unified Diff: xfa/fxjse/context.cpp

Issue 2056733003: Change CFXJSE_Context::GetGlobalObject to return (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@to_string_return
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxjse/context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « xfa/fxjse/context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698