summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_context.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-02-08 20:16:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-08 20:16:09 +0000
commitb3f1046cb2c9bb7fc2a2579b76c8e65b24323002 (patch)
treec687a105ebece091f5a2386f88855c163ba7e6cc /fxjs/cfxjse_context.cpp
parentf0e386de64e030f6d692acfa27e2bc0a50018710 (diff)
downloadpdfium-b3f1046cb2c9bb7fc2a2579b76c8e65b24323002.tar.xz
Make CFXJS_Engine::SetObjectPrivate() static.
Avoids call to CFXJS_Engine::EngineFromIsolateCurrentContext() during the Dispose() path, which feels scary because there aren't guarantees about it having an engine at isolate "dispose" time. Fortunately, |this| is not used, so make that fact clear. Replace some c-style callbacks with std::function while we're at it. Change-Id: Ia1a1a1fcc085d8657939e6f8c8d34fc511afddfe Reviewed-on: https://pdfium-review.googlesource.com/25970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_context.cpp')
-rw-r--r--fxjs/cfxjse_context.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/fxjs/cfxjse_context.cpp b/fxjs/cfxjse_context.cpp
index e2a0540252..61c330d687 100644
--- a/fxjs/cfxjse_context.cpp
+++ b/fxjs/cfxjse_context.cpp
@@ -194,7 +194,7 @@ std::unique_ptr<CFXJSE_Context> CFXJSE_Context::Create(
v8::Local<v8::Object> hGlobalObject = GetGlobalObjectFromContext(hNewContext);
FXJSE_UpdateObjectBinding(hGlobalObject, pGlobalObject);
if (pOptionalEngineToSet)
- CFXJS_Engine::SetEngineInContext(pOptionalEngineToSet, hNewContext);
+ pOptionalEngineToSet->SetIntoContext(hNewContext);
pContext->m_hContext.Reset(pIsolate, hNewContext);
return pContext;