| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2013 Google Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/frame/DOMWindowLifecycleNotifier.h" | 28 #include "core/frame/DOMWindowLifecycleNotifier.h" |
| 29 | 29 |
| 30 #include "core/frame/DOMWindowLifecycleObserver.h" | 30 #include "core/frame/DOMWindowLifecycleObserver.h" |
| 31 | 31 |
| 32 namespace blink { | 32 namespace blink { |
| 33 | 33 |
| 34 void DOMWindowLifecycleNotifier::notifyAddEventListener(LocalDOMWindow* window,
const AtomicString& eventType) | 34 void DOMWindowLifecycleNotifier::notifyAddEventListener(LocalDOMWindow* window,
const AtomicString& eventType) |
| 35 { | 35 { |
| 36 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); | 36 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); |
| 37 for (DOMWindowLifecycleObserver* observer : m_observers) | 37 for (DOMWindowLifecycleObserver* observer : m_observers) { |
| 38 #if !ENABLE(OILPAN) |
| 39 if (!isObserverAlive(observer)) |
| 40 continue; |
| 41 #endif |
| 38 observer->didAddEventListener(window, eventType); | 42 observer->didAddEventListener(window, eventType); |
| 43 } |
| 39 } | 44 } |
| 40 | 45 |
| 41 void DOMWindowLifecycleNotifier::notifyRemoveEventListener(LocalDOMWindow* windo
w, const AtomicString& eventType) | 46 void DOMWindowLifecycleNotifier::notifyRemoveEventListener(LocalDOMWindow* windo
w, const AtomicString& eventType) |
| 42 { | 47 { |
| 43 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); | 48 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); |
| 44 for (DOMWindowLifecycleObserver* observer : m_observers) | 49 for (DOMWindowLifecycleObserver* observer : m_observers) { |
| 50 #if !ENABLE(OILPAN) |
| 51 if (!isObserverAlive(observer)) |
| 52 continue; |
| 53 #endif |
| 45 observer->didRemoveEventListener(window, eventType); | 54 observer->didRemoveEventListener(window, eventType); |
| 55 } |
| 46 } | 56 } |
| 47 | 57 |
| 48 void DOMWindowLifecycleNotifier::notifyRemoveAllEventListeners(LocalDOMWindow* w
indow) | 58 void DOMWindowLifecycleNotifier::notifyRemoveAllEventListeners(LocalDOMWindow* w
indow) |
| 49 { | 59 { |
| 50 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); | 60 TemporaryChange<IterationType> scope(m_iterating, IteratingOverAll); |
| 51 for (DOMWindowLifecycleObserver* observer : m_observers) | 61 for (DOMWindowLifecycleObserver* observer : m_observers) { |
| 62 #if !ENABLE(OILPAN) |
| 63 if (!isObserverAlive(observer)) |
| 64 continue; |
| 65 #endif |
| 52 observer->didRemoveAllEventListeners(window); | 66 observer->didRemoveAllEventListeners(window); |
| 67 } |
| 53 } | 68 } |
| 54 | 69 |
| 55 } // namespace blink | 70 } // namespace blink |
| OLD | NEW |