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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js

Issue 2287713002: DevTools: remove UISourceCodeFrame from context when switching panels. (Closed)
Patch Set: follow-up Created 4 years, 4 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/sources/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 2be5323b8308c26e88c10f81d399c22dc662666a..3a807ee6ae52a9fe27d3a0d9080a25772f394ca4 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -81,6 +81,7 @@ WebInspector.UISourceCodeFrame.prototype = {
wasShown: function()
{
WebInspector.SourceFrame.prototype.wasShown.call(this);
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, this);
this._boundWindowFocused = this._windowFocused.bind(this);
this.element.ownerDocument.defaultView.addEventListener("focus", this._boundWindowFocused, false);
this._checkContentUpdated();
@@ -91,6 +92,7 @@ WebInspector.UISourceCodeFrame.prototype = {
willHide: function()
{
WebInspector.SourceFrame.prototype.willHide.call(this);
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, null);
this.element.ownerDocument.defaultView.removeEventListener("focus", this._boundWindowFocused, false);
delete this._boundWindowFocused;
this._uiSourceCode.removeWorkingCopyGetter();

Powered by Google App Engine
This is Rietveld 408576698