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

Unified Diff: third_party/WebKit/Source/core/dom/MessagePort.cpp

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/core/dom/MessagePort.cpp
diff --git a/third_party/WebKit/Source/core/dom/MessagePort.cpp b/third_party/WebKit/Source/core/dom/MessagePort.cpp
index 68c009156a29ba95bd70461dbfee219becdbe523..5399af5d62331c7626d4cdeb8a11f82d24910c96 100644
--- a/third_party/WebKit/Source/core/dom/MessagePort.cpp
+++ b/third_party/WebKit/Source/core/dom/MessagePort.cpp
@@ -46,13 +46,13 @@
namespace blink {
MessagePort* MessagePort::create(ExecutionContext& executionContext) {
- MessagePort* port = new MessagePort(executionContext);
- port->suspendIfNeeded();
- return port;
+ return new MessagePort(executionContext);
}
MessagePort::MessagePort(ExecutionContext& executionContext)
- : SuspendableObject(&executionContext), m_started(false), m_closed(false) {}
+ : ContextLifecycleObserver(&executionContext),
+ m_started(false),
+ m_closed(false) {}
MessagePort::~MessagePort() {
DCHECK(!m_started || !isEntangled());
@@ -291,7 +291,7 @@ MessagePortArray* MessagePort::entanglePorts(
}
DEFINE_TRACE(MessagePort) {
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
EventTargetWithInlineData::trace(visitor);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/MessagePort.h ('k') | third_party/WebKit/Source/core/fileapi/FileReader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698