Chromium Code Reviews| Index: Source/core/dom/ExecutionContext.h |
| diff --git a/Source/core/dom/ExecutionContext.h b/Source/core/dom/ExecutionContext.h |
| index 840698044bb057c3e1e084d9412daca69cffd064..4e483bed9be53c50c18565dbc899e82b5e2e3899 100644 |
| --- a/Source/core/dom/ExecutionContext.h |
| +++ b/Source/core/dom/ExecutionContext.h |
| @@ -130,6 +130,8 @@ public: |
| virtual EventTarget* errorEventTarget() = 0; |
| virtual EventQueue* eventQueue() const = 0; |
| + virtual bool inBeforeUnloadEvent() const { return m_inBeforeUnloadEvent; } |
| + virtual void setIsBeforeUnloadEvent(bool inBeforeUnloadEvent) { m_inBeforeUnloadEvent = inBeforeUnloadEvent; } |
|
kouhei (in TOK)
2014/10/01 11:38:45
Can you use lifecycle methods in Document instead?
|
| protected: |
| ExecutionContext(); |
| @@ -174,6 +176,7 @@ private: |
| // ExecutionContext's members (notably m_timeouts) is called before they are destructed, |
| // m_lifecycleNotifer should be placed *after* such members. |
| OwnPtr<ContextLifecycleNotifier> m_lifecycleNotifier; |
| + bool m_inBeforeUnloadEvent; |
| }; |
| } // namespace blink |