| Index: sky/engine/core/dom/Microtask.cpp
|
| diff --git a/sky/engine/core/dom/Microtask.cpp b/sky/engine/core/dom/Microtask.cpp
|
| index 04c27dcf9b1151320ae180e9329d54f754caa12a..7be9902076e9a6739dda9803f0a3d06180951054 100644
|
| --- a/sky/engine/core/dom/Microtask.cpp
|
| +++ b/sky/engine/core/dom/Microtask.cpp
|
| @@ -32,7 +32,7 @@
|
| #include "sky/engine/core/dom/Microtask.h"
|
|
|
| #include "base/bind.h"
|
| -#include "sky/engine/platform/TraceEvent.h"
|
| +#include "base/trace_event/trace_event.h"
|
| #include "sky/engine/public/platform/WebThread.h"
|
| #include "sky/engine/wtf/OwnPtr.h"
|
| #include "sky/engine/wtf/Vector.h"
|
| @@ -71,6 +71,8 @@ void Microtask::performCheckpoint()
|
| {
|
| MicrotaskQueue& queue = microtaskQueue();
|
| while(!queue.isEmpty()) {
|
| + TRACE_EVENT0("sky", "Microtask::performCheckpoint");
|
| +
|
| MicrotaskQueue local;
|
| swap(queue, local);
|
| for (const auto& task : local)
|
| @@ -78,12 +80,6 @@ void Microtask::performCheckpoint()
|
| }
|
| }
|
|
|
| -// static void microtaskFunctionCallback(void* data)
|
| -// {
|
| -// OwnPtr<WebThread::Task> task = adoptPtr(static_cast<WebThread::Task*>(data));
|
| -// task->run();
|
| -// }
|
| -
|
| void Microtask::enqueueMicrotask(PassOwnPtr<WebThread::Task> callback)
|
| {
|
| microtaskQueue().append(callback);
|
|
|