diff options
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Runtime.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/JS_Runtime.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index f52e23a094..b08823f6ed 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -26,6 +26,7 @@ #include "global.h" #include "report.h" #include "util.h" +#include "third_party/base/stl_util.h" // static void IJS_Runtime::Initialize(unsigned int slot, void* isolate) { @@ -206,11 +207,11 @@ v8::Local<v8::Context> CJS_Runtime::NewJSContext() { } void CJS_Runtime::AddObserver(Observer* observer) { - ASSERT(m_observers.find(observer) == m_observers.end()); + ASSERT(!pdfium::ContainsKey(m_observers, observer)); m_observers.insert(observer); } void CJS_Runtime::RemoveObserver(Observer* observer) { - ASSERT(m_observers.find(observer) != m_observers.end()); + ASSERT(pdfium::ContainsKey(m_observers, observer)); m_observers.erase(observer); } |