summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-06 19:13:25 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-06 19:13:25 +0000
commitb8a2978cbff28424cb6364092236072dba8073d7 (patch)
tree20a9b5a42685e8fa2120a0c9a5b28a934f6a25fa
parentddaa40fe873070d3aae9a21b9a93848fc7e809f1 (diff)
downloadpdfium-b8a2978cbff28424cb6364092236072dba8073d7.tar.xz
Get global consts without use of v8::Context slot
Another step in the move away from v8::Context slots. Change-Id: I302d1b3305755088c663214120e582b783cc5fbb Reviewed-on: https://pdfium-review.googlesource.com/34211 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
-rw-r--r--fxjs/cjs_globalarrays.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fxjs/cjs_globalarrays.cpp b/fxjs/cjs_globalarrays.cpp
index 818b13f0e8..a697c18ac6 100644
--- a/fxjs/cjs_globalarrays.cpp
+++ b/fxjs/cjs_globalarrays.cpp
@@ -15,9 +15,8 @@
(rt)->SetConstArray((name), array); \
(rt)->DefineGlobalConst( \
(name), [](const v8::FunctionCallbackInfo<v8::Value>& info) { \
- CJS_Runtime* pCurrentRuntime = \
- CJS_Runtime::RuntimeFromIsolateCurrentContext( \
- info.GetIsolate()); \
+ CJS_Object* pObj = CFXJS_Engine::GetObjectPrivate(info.Holder()); \
+ CJS_Runtime* pCurrentRuntime = pObj->GetRuntime(); \
if (pCurrentRuntime) \
info.GetReturnValue().Set(pCurrentRuntime->GetConstArray(name)); \
}); \