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

Unified Diff: Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js

Issue 1183143002: [DevTools] Fixed blink of "No Event Listeners" in event listeners sidebar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
diff --git a/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js b/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
index e9ad6c6b0b48b26172119691adfc46b2762d05b2..6d42d405aa3ad43a34c5b44a70c72adb643e5d01 100644
--- a/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
+++ b/Source/devtools/front_end/sources/ObjectEventListenersSidebarPane.js
@@ -28,12 +28,13 @@ WebInspector.ObjectEventListenersSidebarPane.prototype = {
this._lastRequestedContext.target().runtimeAgent().releaseObjectGroup(WebInspector.ObjectEventListenersSidebarPane._objectGroupName);
delete this._lastRequestedContext;
}
- this._eventListenersView.reset();
var executionContext = WebInspector.context.flavor(WebInspector.ExecutionContext);
- if (!executionContext)
+ if (!executionContext) {
+ this._eventListenersView.reset();
lushnikov 2015/06/17 14:44:50 addEmptyHolderIfNeeded
kozy 2015/06/17 15:54:32 Done.
return;
+ }
this._lastRequestedContext = executionContext;
- this._windowObjectInContext(executionContext).then(this._eventListenersView.addObjectEventListeners.bind(this._eventListenersView));
+ Promise.all([this._windowObjectInContext(executionContext)]).then(this._eventListenersView.addObjects.bind(this._eventListenersView));
},
expand: function()
@@ -49,7 +50,6 @@ WebInspector.ObjectEventListenersSidebarPane.prototype = {
_windowObjectInContext: function(executionContext)
{
return new Promise(windowObjectInContext);
-
/**
* @param {function(?)} fulfill
* @param {function(*)} reject

Powered by Google App Engine
This is Rietveld 408576698