Title: [196464] trunk/Source/WebInspectorUI
- Revision
- 196464
- Author
- [email protected]
- Date
- 2016-02-11 21:17:12 -0800 (Thu, 11 Feb 2016)
Log Message
Web Inspector: SourceCodeTextEditor close() generates removeEventListener warnings
https://bugs.webkit.org/show_bug.cgi?id=154150
Patch by Joseph Pecoraro <[email protected]> on 2016-02-11
Reviewed by Timothy Hatcher.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.close):
Remove the event listeners in the cases that we would have added them.
If we have SourceMap information we should remove the key listener,
and if we don't we should remove the SourceMapAdded listener.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (196463 => 196464)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-02-12 05:14:32 UTC (rev 196463)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-02-12 05:17:12 UTC (rev 196464)
@@ -1,3 +1,16 @@
+2016-02-11 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: SourceCodeTextEditor close() generates removeEventListener warnings
+ https://bugs.webkit.org/show_bug.cgi?id=154150
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/SourceCodeTextEditor.js:
+ (WebInspector.SourceCodeTextEditor.prototype.close):
+ Remove the event listeners in the cases that we would have added them.
+ If we have SourceMap information we should remove the key listener,
+ and if we don't we should remove the SourceMapAdded listener.
+
2016-02-10 Timothy Hatcher <[email protected]>
Web Inspector: Add new icon for the Timeline Recording navigation bar item
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js (196463 => 196464)
--- trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2016-02-12 05:14:32 UTC (rev 196463)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js 2016-02-12 05:17:12 UTC (rev 196464)
@@ -139,8 +139,10 @@
WebInspector.issueManager.removeEventListener(WebInspector.IssueManager.Event.IssueWasAdded, this._issueWasAdded, this);
- WebInspector.notifications.removeEventListener(WebInspector.Notification.GlobalModifierKeysDidChange, this._updateTokenTrackingControllerState, this);
- this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
+ if (this._sourceCode instanceof WebInspector.SourceMapResource || this._sourceCode.sourceMaps.length > 0)
+ WebInspector.notifications.removeEventListener(WebInspector.Notification.GlobalModifierKeysDidChange, this._updateTokenTrackingControllerState, this);
+ else
+ this._sourceCode.removeEventListener(WebInspector.SourceCode.Event.SourceMapAdded, this._sourceCodeSourceMapAdded, this);
}
canBeFormatted()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes