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

Side by Side Diff: Source/devtools/front_end/CSSStyleModel.js

Issue 217423015: DevTools: fix leaking CSSRules through LiveLocations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 return this._header.rawLocationToUILocation(cssLocation.lineNumber, cssLocation.columnNumber); 666 return this._header.rawLocationToUILocation(cssLocation.lineNumber, cssLocation.columnNumber);
667 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(cssLocation .url); 667 var uiSourceCode = WebInspector.workspace.uiSourceCodeForURL(cssLocation .url);
668 if (!uiSourceCode) 668 if (!uiSourceCode)
669 return null; 669 return null;
670 return new WebInspector.UILocation(uiSourceCode, cssLocation.lineNumber, cssLocation.columnNumber); 670 return new WebInspector.UILocation(uiSourceCode, cssLocation.lineNumber, cssLocation.columnNumber);
671 }, 671 },
672 672
673 dispose: function() 673 dispose: function()
674 { 674 {
675 WebInspector.LiveLocation.prototype.dispose.call(this); 675 WebInspector.LiveLocation.prototype.dispose.call(this);
676 if (this._header)
677 this._header._removeLocation(this);
676 this._model.removeEventListener(WebInspector.CSSStyleModel.Events.StyleS heetAdded, this._styleSheetAdded, this); 678 this._model.removeEventListener(WebInspector.CSSStyleModel.Events.StyleS heetAdded, this._styleSheetAdded, this);
677 this._model.removeEventListener(WebInspector.CSSStyleModel.Events.StyleS heetRemoved, this._styleSheetRemoved, this); 679 this._model.removeEventListener(WebInspector.CSSStyleModel.Events.StyleS heetRemoved, this._styleSheetRemoved, this);
678 }, 680 },
679 681
680 __proto__: WebInspector.LiveLocation.prototype 682 __proto__: WebInspector.LiveLocation.prototype
681 } 683 }
682 684
683 /** 685 /**
684 * @constructor 686 * @constructor
685 * @implements {WebInspector.RawLocation} 687 * @implements {WebInspector.RawLocation}
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 for (var i = 0; i < callbacks.length; ++i) 1608 for (var i = 0; i < callbacks.length; ++i)
1607 callbacks[i](computedStyle); 1609 callbacks[i](computedStyle);
1608 } 1610 }
1609 } 1611 }
1610 } 1612 }
1611 1613
1612 /** 1614 /**
1613 * @type {!WebInspector.CSSStyleModel} 1615 * @type {!WebInspector.CSSStyleModel}
1614 */ 1616 */
1615 WebInspector.cssModel; 1617 WebInspector.cssModel;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698