From 6ffd840c1f4d7d74a6c4c07c5791c4f3db8d50b9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 6 Jun 2018 20:51:04 +0000 Subject: Remove still more v8::Context slot usage. Removes CJS_Runtime::RuntimeFromIsolateCurrentContext() Change-Id: I51abcf32aaafac522e1595edf663507c26781357 Reviewed-on: https://pdfium-review.googlesource.com/34230 Commit-Queue: Tom Sepez Commit-Queue: dsinclair Reviewed-by: dsinclair --- fxjs/cjs_publicmethods.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'fxjs/cjs_publicmethods.cpp') diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp index d37706c973..678aca5317 100644 --- a/fxjs/cjs_publicmethods.cpp +++ b/fxjs/cjs_publicmethods.cpp @@ -120,8 +120,11 @@ template >&)> void JSGlobalFunc(const char* func_name_string, const v8::FunctionCallbackInfo& info) { - CJS_Runtime* pRuntime = - CJS_Runtime::RuntimeFromIsolateCurrentContext(info.GetIsolate()); + CJS_Object* pObj = CFXJS_Engine::GetObjectPrivate(info.Holder()); + if (!pObj) + return; + + CJS_Runtime* pRuntime = pObj->GetRuntime(); if (!pRuntime) return; -- cgit v1.2.3