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

Unified Diff: third_party/WebKit/Source/modules/eventsource/EventSource.h

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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/modules/eventsource/EventSource.h
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.h b/third_party/WebKit/Source/modules/eventsource/EventSource.h
index 44e133b31b4474e9a124fcdf651f6a725174f197..05a97435174ea439724dc670d6d50d4c12aeb504 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSource.h
+++ b/third_party/WebKit/Source/modules/eventsource/EventSource.h
@@ -33,7 +33,7 @@
#define EventSource_h
#include "bindings/core/v8/ActiveScriptWrappable.h"
-#include "core/dom/SuspendableObject.h"
+#include "core/dom/ContextLifecycleObserver.h"
#include "core/events/EventTarget.h"
#include "core/loader/ThreadableLoader.h"
#include "core/loader/ThreadableLoaderClient.h"
@@ -55,7 +55,7 @@ class MODULES_EXPORT EventSource final
: public EventTargetWithInlineData,
private ThreadableLoaderClient,
public ActiveScriptWrappable<EventSource>,
- public SuspendableObject,
+ public ContextLifecycleObserver,
public EventSourceParser::Client {
DEFINE_WRAPPERTYPEINFO();
USING_GARBAGE_COLLECTED_MIXIN(EventSource);
@@ -85,12 +85,13 @@ class MODULES_EXPORT EventSource final
const AtomicString& interfaceName() const override;
ExecutionContext* getExecutionContext() const override;
- // SuspendableObject
+ // ContextLifecycleObserver
//
- // Note: suspend() is noop since ScopedPageLoadDeferrer calls
- // Page::setDefersLoading() and it defers delivery of events from the
- // loader, and therefore the methods of this class for receiving
- // asynchronous events from the loader won't be invoked.
+ // Note: We don't need to inherit from SuspendableObject since
+ // ScopedPageLoadDeferrer calls Page::setDefersLoading() and
+ // it defers delivery of events from the loader, and therefore
+ // the methods of this class for receiving asynchronous events
+ // from the loader won't be invoked.
void contextDestroyed() override;
// ScriptWrappable

Powered by Google App Engine
This is Rietveld 408576698