summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-26 15:40:17 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-26 20:09:07 +0000
commit145cb375e92f6ee5bab73deb597322ed60d97029 (patch)
tree7225d4c60c45a838789ae9a42a9ec3899e23e0d4
parent60bde10736fd78a2333cf1513aea779df9346b35 (diff)
downloadpdfium-145cb375e92f6ee5bab73deb597322ed60d97029.tar.xz
Use method to get global object
This CL switches the CFXJSE_Context::GetGlobalObject method to call FXJSE_GetGlobalObjectFromContext() instead of getting the global object directly. Bug: pdfium:832 Change-Id: I6c04adb0a9775926d3a0708cefb8bba85c60fd21 Reviewed-on: https://pdfium-review.googlesource.com/9111 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
-rw-r--r--fxjs/cfxjse_context.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fxjs/cfxjse_context.cpp b/fxjs/cfxjse_context.cpp
index 40882bac56..87ec30f9c3 100644
--- a/fxjs/cfxjse_context.cpp
+++ b/fxjs/cfxjse_context.cpp
@@ -198,7 +198,8 @@ std::unique_ptr<CFXJSE_Value> CFXJSE_Context::GetGlobalObject() {
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();
+ v8::Local<v8::Object> hGlobalObject =
+ FXJSE_GetGlobalObjectFromContext(hContext);
pValue->ForceSetValue(hGlobalObject);
return pValue;
}