Bug 1595565 - Previewing a message from the devtools should work around delays r=pdahiya
authorAndrei Oprea <andrei.br92@gmail.com>
Mon, 18 Nov 2019 18:05:53 +0000
changeset 503656 c96885709bc90f4620d1673a963a6c3ef6768c62
parent 503655 6aac01ec49e378655ac9a531e7651084570c95bd
child 503657 448a9b8eafefdf1bade00201da563e983f1ca609
push id36843
push usershindli@mozilla.com
push dateMon, 25 Nov 2019 21:46:44 +0000
treeherdermozilla-central@a0b2e7b06070 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspdahiya
bugs1595565
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1595565 - Previewing a message from the devtools should work around delays r=pdahiya Differential Revision: https://phabricator.services.mozilla.com/D52558
browser/components/newtab/lib/ToolbarBadgeHub.jsm
--- a/browser/components/newtab/lib/ToolbarBadgeHub.jsm
+++ b/browser/components/newtab/lib/ToolbarBadgeHub.jsm
@@ -303,16 +303,19 @@ class _ToolbarBadgeHub {
     );
   }
 
   registerBadgeNotificationListener(message, options = {}) {
     // We need to clear any existing notifications and only show
     // the one set by devtools
     if (options.force) {
       this.removeAllNotifications();
+      // When debugging immediately show the badge
+      this.registerBadgeToAllWindows(message);
+      return;
     }
 
     if (message.content.delay) {
       this.state.showBadgeTimeoutId = setTimeout(() => {
         requestIdleCallback(() => this.registerBadgeToAllWindows(message));
       }, message.content.delay);
     } else {
       this.registerBadgeToAllWindows(message);