summaryrefslogtreecommitdiff
path: root/fxjs/cfxjs_engine.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-06 18:30:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-06 18:30:15 +0000
commitddaa40fe873070d3aae9a21b9a93848fc7e809f1 (patch)
tree222d228484da9e234a647254440e9aff98dca224 /fxjs/cfxjs_engine.cpp
parent5caa34c64382d8587a3ec3de5edbb30976b1390d (diff)
downloadpdfium-ddaa40fe873070d3aae9a21b9a93848fc7e809f1.tar.xz
Stop using some v8::Context slot to find runtime.
Instead, use the object binding's pointer. Puts the cart back behind the horse. Change-Id: I4c06ae991b871c6e90b0e6c70b69886addca2354 Reviewed-on: https://pdfium-review.googlesource.com/33630 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjs_engine.cpp')
-rw-r--r--fxjs/cfxjs_engine.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fxjs/cfxjs_engine.cpp b/fxjs/cfxjs_engine.cpp
index 107ed3abae..5d0f3b0ec5 100644
--- a/fxjs/cfxjs_engine.cpp
+++ b/fxjs/cfxjs_engine.cpp
@@ -591,15 +591,16 @@ void CFXJS_Engine::Error(const WideString& message) {
GetIsolate()->ThrowException(NewString(message.AsStringView()));
}
+// static
CJS_Object* CFXJS_Engine::GetObjectPrivate(v8::Local<v8::Object> pObj) {
CFXJS_PerObjectData* pData = CFXJS_PerObjectData::GetFromObject(pObj);
if (!pData && !pObj.IsEmpty()) {
// It could be a global proxy object.
v8::Local<v8::Value> v = pObj->GetPrototype();
- v8::Local<v8::Context> context = GetIsolate()->GetCurrentContext();
if (v->IsObject()) {
pData = CFXJS_PerObjectData::GetFromObject(
- v->ToObject(context).ToLocalChecked());
+ v->ToObject(v8::Isolate::GetCurrent()->GetCurrentContext())
+ .ToLocalChecked());
}
}
return pData ? pData->m_pPrivate.get() : nullptr;