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

Unified Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 583833002: Fix and re-enable v8 idle notification after commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/render_widget_compositor.cc
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc
index c2c542c9a33f13354e835e71e69d955bf7bd930c..ae2d0d7902bbfecac808ac935043f0086d918783 100644
--- a/content/renderer/gpu/render_widget_compositor.cc
+++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -423,7 +423,7 @@ RenderWidgetCompositor::RenderWidgetCompositor(RenderWidget* widget,
bool threaded)
: threaded_(threaded),
widget_(widget),
- send_v8_idle_notification_after_commit_(false) {
+ send_v8_idle_notification_after_commit_(true) {
CommandLine* cmd = CommandLine::ForCurrentProcess();
if (cmd->HasSwitch(switches::kEnableV8IdleNotificationAfterCommit))
@@ -817,7 +817,8 @@ void RenderWidgetCompositor::DidCommit() {
// Convert to 32-bit microseconds first to avoid costly 64-bit division.
int32 idle_time_in_us = idle_time.InMicroseconds();
int32 idle_time_in_ms = idle_time_in_us / 1000;
- blink::mainThreadIsolate()->IdleNotification(idle_time_in_ms);
+ if (idle_time_in_ms)
+ blink::mainThreadIsolate()->IdleNotification(idle_time_in_ms);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698