diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-09-22 15:50:03 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-09-22 15:50:03 -0700 |
commit | 5d0e8432c63a5e7a0b42fd4621c1c454ff49985e (patch) | |
tree | e3f42bd19b8ad6ce36b2ef9e250b4def7e2e3b63 /fpdfsdk/src/javascript/JS_Context.cpp | |
parent | 7cfadd97215265afd7771d6c36b5cfda54427169 (diff) | |
download | pdfium-5d0e8432c63a5e7a0b42fd4621c1c454ff49985e.tar.xz |
Merge to XFA: Use std::set<> to track active event handlers.
Merge conflicts in JS_Runtime.cpp
(cherry picked from commit d8d223127d706aa4961b2c9b0037ab256fce9a8f)
Original Review URL: https://codereview.chromium.org/1352393003 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1365503003 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Context.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/JS_Context.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fpdfsdk/src/javascript/JS_Context.cpp b/fpdfsdk/src/javascript/JS_Context.cpp index d4d1f2c877..f090326226 100644 --- a/fpdfsdk/src/javascript/JS_Context.cpp +++ b/fpdfsdk/src/javascript/JS_Context.cpp @@ -47,8 +47,9 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script, m_bBusy = TRUE; ASSERT(m_pEventHandler->IsValid()); - if (!m_pRuntime->AddEventToLoop(m_pEventHandler->TargetName(), - m_pEventHandler->EventType())) { + CJS_Runtime::FieldEvent event(m_pEventHandler->TargetName(), + m_pEventHandler->EventType()); + if (!m_pRuntime->AddEventToSet(event)) { info = JSGetStringFromID(this, IDS_STRING_JSEVENT); return FALSE; } @@ -69,9 +70,7 @@ FX_BOOL CJS_Context::RunScript(const CFX_WideString& script, info = JSGetStringFromID(this, IDS_STRING_RUN); } - m_pRuntime->RemoveEventInLoop(m_pEventHandler->TargetName(), - m_pEventHandler->EventType()); - + m_pRuntime->RemoveEventFromSet(event); m_pEventHandler->Destroy(); m_bBusy = FALSE; |