From ddaa40fe873070d3aae9a21b9a93848fc7e809f1 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 6 Jun 2018 18:30:15 +0000 Subject: 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 Reviewed-by: dsinclair --- fxjs/cfxjs_engine.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fxjs/cfxjs_engine.cpp') 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 pObj) { CFXJS_PerObjectData* pData = CFXJS_PerObjectData::GetFromObject(pObj); if (!pData && !pObj.IsEmpty()) { // It could be a global proxy object. v8::Local v = pObj->GetPrototype(); - v8::Local 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; -- cgit v1.2.3