summaryrefslogtreecommitdiff
path: root/fxjs/cjs_publicmethods.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-06 20:51:04 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-06 20:51:04 +0000
commit6ffd840c1f4d7d74a6c4c07c5791c4f3db8d50b9 (patch)
tree1020d5547830ef16b52648818232c69c65850cdf /fxjs/cjs_publicmethods.cpp
parent222d3fdf687554b298650080e2e8f47d83411651 (diff)
downloadpdfium-6ffd840c1f4d7d74a6c4c07c5791c4f3db8d50b9.tar.xz
Remove still more v8::Context slot usage.chromium/3452
Removes CJS_Runtime::RuntimeFromIsolateCurrentContext() Change-Id: I51abcf32aaafac522e1595edf663507c26781357 Reviewed-on: https://pdfium-review.googlesource.com/34230 Commit-Queue: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_publicmethods.cpp')
-rw-r--r--fxjs/cjs_publicmethods.cpp7
1 files changed, 5 insertions, 2 deletions
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 <CJS_Return (*F)(CJS_Runtime*,
const std::vector<v8::Local<v8::Value>>&)>
void JSGlobalFunc(const char* func_name_string,
const v8::FunctionCallbackInfo<v8::Value>& 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;