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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Context.js

Issue 2314503005: DevTools: remove UISourceCodeFrame from context when switching panels. (Closed)
Patch Set: Created 4 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
Index: third_party/WebKit/Source/devtools/front_end/ui/Context.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Context.js b/third_party/WebKit/Source/devtools/front_end/ui/Context.js
index fdf8fb56337d60d1043354442afaa8ffa3bfbe05..df09297d604ec9ce130600145be1544212badbb1 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Context.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Context.js
@@ -42,10 +42,10 @@ WebInspector.Context.prototype = {
*/
_dispatchFlavorChange: function(flavorType, flavorValue)
{
- self.runtime.extensions(WebInspector.ContextFlavorListener, flavorValue).map(extension => {
- extension.instance().then(instance => /** @type {!WebInspector.ContextFlavorListener} */ (instance).flavorChanged(flavorValue));
- });
-
+ for (var extension of self.runtime.extensions(WebInspector.ContextFlavorListener)) {
+ if (extension.hasContextType(flavorType))
+ extension.instance().then(instance => /** @type {!WebInspector.ContextFlavorListener} */ (instance).flavorChanged(flavorValue));
+ }
var dispatcher = this._eventDispatchers.get(flavorType);
if (!dispatcher)
return;

Powered by Google App Engine
This is Rietveld 408576698