From b8a2978cbff28424cb6364092236072dba8073d7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 6 Jun 2018 19:13:25 +0000 Subject: 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 Reviewed-by: dsinclair --- fxjs/cjs_globalarrays.cpp | 5 ++--- 1 file 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& 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)); \ }); \ -- cgit v1.2.3