summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/cjs_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript/cjs_runtime.cpp')
-rw-r--r--fpdfsdk/javascript/cjs_runtime.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/fpdfsdk/javascript/cjs_runtime.cpp b/fpdfsdk/javascript/cjs_runtime.cpp
index b12a3f5eeb..67d45d5e4a 100644
--- a/fpdfsdk/javascript/cjs_runtime.cpp
+++ b/fpdfsdk/javascript/cjs_runtime.cpp
@@ -124,9 +124,7 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp)
}
CJS_Runtime::~CJS_Runtime() {
- for (auto* obs : m_observers)
- obs->OnDestroyed();
-
+ NotifyObservers();
ReleaseEngine();
if (m_isolateManaged) {
GetIsolate()->Dispose();
@@ -255,16 +253,6 @@ void CJS_Runtime::RemoveEventFromSet(const FieldEvent& event) {
m_FieldEventSet.erase(event);
}
-void CJS_Runtime::AddObserver(Observer* observer) {
- ASSERT(!pdfium::ContainsKey(m_observers, observer));
- m_observers.insert(observer);
-}
-
-void CJS_Runtime::RemoveObserver(Observer* observer) {
- ASSERT(pdfium::ContainsKey(m_observers, observer));
- m_observers.erase(observer);
-}
-
#ifdef PDF_ENABLE_XFA
CFX_WideString ChangeObjName(const CFX_WideString& str) {
CFX_WideString sRet = str;