Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: Source/core/dom/ExecutionContext.h

Issue 585873002: Show a warning when using sync xhr. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated patch with reset -expected.txt files. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698