From 145cb375e92f6ee5bab73deb597322ed60d97029 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 26 Jul 2017 15:40:17 -0400 Subject: 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 Commit-Queue: dsinclair --- fxjs/cfxjse_context.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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_Context::GetGlobalObject() { CFXJSE_ScopeUtil_IsolateHandleContext scope(this); v8::Local hContext = v8::Local::New(m_pIsolate, m_hContext); - v8::Local hGlobalObject = hContext->Global(); + v8::Local hGlobalObject = + FXJSE_GetGlobalObjectFromContext(hContext); pValue->ForceSetValue(hGlobalObject); return pValue; } -- cgit v1.2.3