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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp

Issue 1387773002: Oilpan: fix build after r352251. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/RejectedPromises.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
index e88c277eb7a4b4a7eebe4782af8811efe5afd822..f62c1e4e7f3ec0b8230ce6b81feaade3d033c0f3 100644
--- a/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/RejectedPromises.cpp
@@ -227,25 +227,32 @@ void RejectedPromises::handlerAdded(v8::PromiseRejectMessage data)
}
}
+PassOwnPtrWillBeRawPtr<RejectedPromises::MessageQueue> RejectedPromises::createMessageQueue()
+{
+ return adoptPtrWillBeNoop(new MessageQueue());
+}
+
void RejectedPromises::dispose()
{
- if (!m_queue.isEmpty()) {
- OwnPtrWillBeRawPtr<WillBeHeapDeque<OwnPtrWillBeMember<Message>>> queue = adoptPtr(new WillBeHeapDeque<OwnPtrWillBeMember<Message>>());
- queue->swap(m_queue);
- processQueueNow(queue.release());
- }
+ if (m_queue.isEmpty())
+ return;
+
+ OwnPtrWillBeRawPtr<MessageQueue> queue = createMessageQueue();
+ queue->swap(m_queue);
+ processQueueNow(queue.release());
}
void RejectedPromises::processQueue()
{
if (m_queue.isEmpty())
return;
- OwnPtrWillBeRawPtr<WillBeHeapDeque<OwnPtrWillBeMember<Message>>> queue = adoptPtr(new WillBeHeapDeque<OwnPtrWillBeMember<Message>>());
+
+ OwnPtrWillBeRawPtr<MessageQueue> queue = createMessageQueue();
queue->swap(m_queue);
Platform::current()->currentThread()->scheduler()->timerTaskRunner()->postTask(FROM_HERE, new Task(bind(&RejectedPromises::processQueueNow, this, queue.release())));
}
-void RejectedPromises::processQueueNow(PassOwnPtrWillBeRawPtr<WillBeHeapDeque<OwnPtrWillBeMember<Message>>> queue)
+void RejectedPromises::processQueueNow(PassOwnPtrWillBeRawPtr<MessageQueue> queue)
{
// Remove collected handlers.
for (size_t i = 0; i < m_reportedAsErrors.size();) {
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/RejectedPromises.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698