Commit 2f357961 authored by ulan@chromium.org's avatar ulan@chromium.org

Remove IdleNotification call in the main thread of foreground tab.

V8 posts idle tasks explicitly.

BUG=chromium:490559

Review URL: https://codereview.chromium.org/1320073005

git-svn-id: svn://svn.chromium.org/blink/trunk@201977 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6150920e
......@@ -330,23 +330,6 @@ static bool codeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> conte
return false;
}
static void idleGCTaskInMainThread(double deadlineSeconds)
{
ASSERT(isMainThread());
ASSERT(RuntimeEnabledFeatures::v8IdleTasksEnabled());
bool gcFinished = false;
v8::Isolate* isolate = v8::Isolate::GetCurrent();
Platform* platform = Platform::current();
if (deadlineSeconds > platform->monotonicallyIncreasingTime())
gcFinished = isolate->IdleNotificationDeadline(deadlineSeconds);
if (gcFinished)
platform->currentThread()->scheduler()->postIdleTaskAfterWakeup(FROM_HERE, WTF::bind<double>(idleGCTaskInMainThread));
else
platform->currentThread()->scheduler()->postIdleTask(FROM_HERE, WTF::bind<double>(idleGCTaskInMainThread));
}
static void timerTraceProfilerInMainThread(const char* name, int status)
{
if (!status) {
......@@ -415,8 +398,6 @@ void V8Initializer::initializeMainThreadIfNeeded()
if (RuntimeEnabledFeatures::v8IdleTasksEnabled()) {
WebScheduler* scheduler = Platform::current()->currentThread()->scheduler();
V8PerIsolateData::enableIdleTasks(isolate, adoptPtr(new V8IdleTaskRunner(scheduler)));
// FIXME: Remove idleGCTaskInMainThread once V8 starts posting idle task explicity.
scheduler->postIdleTask(FROM_HERE, WTF::bind<double>(idleGCTaskInMainThread));
}
isolate->SetEventLogger(timerTraceProfilerInMainThread);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment