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

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

Issue 2420223002: Dispatching errors across iframes don't match webplatform tests
Patch Set: Added nested errors test and scope class." Created 4 years, 2 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: third_party/WebKit/Source/core/dom/ExecutionContext.h
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContext.h b/third_party/WebKit/Source/core/dom/ExecutionContext.h
index 569a576428e3879b976e87227acb38bd03ec8fa7..56dd6815260dcd7fbfc978c1da9ed92f784da871 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContext.h
+++ b/third_party/WebKit/Source/core/dom/ExecutionContext.h
@@ -28,6 +28,7 @@
#ifndef ExecutionContext_h
#define ExecutionContext_h
+#include "bindings/core/v8/ScriptState.h"
#include "core/CoreExport.h"
#include "core/dom/ContextLifecycleNotifier.h"
#include "core/dom/ContextLifecycleObserver.h"
@@ -180,6 +181,17 @@ class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier,
void setReferrerPolicy(ReferrerPolicy);
virtual ReferrerPolicy getReferrerPolicy() const { return m_referrerPolicy; }
+ void setErrorEventScriptState(
+ PassRefPtr<ScriptStateForErrorEvent> scriptState) {
+ m_errorEventScriptStates.append(scriptState);
+ }
+ void clearErrorEventScriptState() { m_errorEventScriptStates.removeLast(); }
+ ScriptState* errorEventScriptState() {
+ return m_errorEventScriptStates.size() != 0
+ ? m_errorEventScriptStates.last()->scriptState()
+ : nullptr;
+ }
+
protected:
ExecutionContext();
virtual ~ExecutionContext();
@@ -195,6 +207,7 @@ class CORE_EXPORT ExecutionContext : public ContextLifecycleNotifier,
bool m_inDispatchErrorEvent;
HeapVector<Member<ErrorEvent>> m_pendingExceptions;
+ Vector<RefPtr<ScriptStateForErrorEvent>> m_errorEventScriptStates;
bool m_activeDOMObjectsAreSuspended;
bool m_activeDOMObjectsAreStopped;

Powered by Google App Engine
This is Rietveld 408576698