summaryrefslogtreecommitdiff
path: root/fxjs/cjs_eventhandler.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/cjs_eventhandler.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/cjs_eventhandler.cpp')
-rw-r--r--fxjs/cjs_eventhandler.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/fxjs/cjs_eventhandler.cpp b/fxjs/cjs_eventhandler.cpp
index 2f42d4157f..0fd330fd13 100644
--- a/fxjs/cjs_eventhandler.cpp
+++ b/fxjs/cjs_eventhandler.cpp
@@ -580,10 +580,11 @@ CJS_Field* CJS_EventHandler::Source() {
if (pFieldObj.IsEmpty())
return nullptr;
- CJS_Document* pJSDocument =
- static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
- CJS_Field* pJSField =
- static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
+ auto* pJSDocument =
+ static_cast<CJS_Document*>(CFXJS_Engine::GetObjectPrivate(pDocObj));
+
+ auto* pJSField =
+ static_cast<CJS_Field*>(CFXJS_Engine::GetObjectPrivate(pFieldObj));
pJSDocument->SetFormFillEnv(m_pTargetFormFillEnv
? m_pTargetFormFillEnv.Get()
@@ -605,10 +606,11 @@ CJS_Field* CJS_EventHandler::Target_Field() {
if (pFieldObj.IsEmpty())
return nullptr;
- CJS_Document* pJSDocument =
- static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pDocObj));
- CJS_Field* pJSField =
- static_cast<CJS_Field*>(pRuntime->GetObjectPrivate(pFieldObj));
+ auto* pJSDocument =
+ static_cast<CJS_Document*>(CFXJS_Engine::GetObjectPrivate(pDocObj));
+
+ auto* pJSField =
+ static_cast<CJS_Field*>(CFXJS_Engine::GetObjectPrivate(pFieldObj));
pJSDocument->SetFormFillEnv(m_pTargetFormFillEnv
? m_pTargetFormFillEnv.Get()