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

Unified Diff: Source/core/dom/MutationObserver.cpp

Issue 242123005: Allow posting a Task to Microtasks (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: use WebThread::Tasl Created 6 years, 8 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/MutationObserver.cpp
diff --git a/Source/core/dom/MutationObserver.cpp b/Source/core/dom/MutationObserver.cpp
index 6f4fb9ec0fe39db4359629b189ef4fc822bebdda..c95263007a22e90ae1c6eed461eee182fd90f2f4 100644
--- a/Source/core/dom/MutationObserver.cpp
+++ b/Source/core/dom/MutationObserver.cpp
@@ -42,6 +42,7 @@
#include "core/dom/MutationRecord.h"
#include "core/dom/Node.h"
#include "core/inspector/InspectorInstrumentation.h"
+#include "platform/Task.h"
#include "wtf/MainThread.h"
namespace WebCore {
@@ -186,7 +187,7 @@ static MutationObserverSet& suspendedMutationObservers()
static void activateObserver(PassRefPtr<MutationObserver> observer)
{
if (activeMutationObservers().isEmpty())
- Microtask::enqueueMicrotask(&MutationObserver::deliverMutations);
+ Microtask::enqueueMicrotask(new Task(WTF::bind(&MutationObserver::deliverMutations)));
abarth-chromium 2014/04/18 16:01:04 Maybe Microtask::enqueueMicrotask should have an o
activeMutationObservers().add(observer);
}

Powered by Google App Engine
This is Rietveld 408576698