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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleModel.js

Issue 2298473003: DevTools: do not leak memory through event listeners (Closed)
Patch Set: cleanup - some clients have being cleaning event listeners 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/common/Object.js ('k') | 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 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @extends {WebInspector.Object} 6 * @extends {WebInspector.Object}
7 * @constructor 7 * @constructor
8 */ 8 */
9 WebInspector.ComputedStyleModel = function() 9 WebInspector.ComputedStyleModel = function()
10 { 10 {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this._onComputedStyleChanged(null); 45 this._onComputedStyleChanged(null);
46 }, 46 },
47 47
48 /** 48 /**
49 * @param {?WebInspector.Target} target 49 * @param {?WebInspector.Target} target
50 */ 50 */
51 _updateTarget: function(target) 51 _updateTarget: function(target)
52 { 52 {
53 if (this._target === target) 53 if (this._target === target)
54 return; 54 return;
55 if (this._targetEvents) { 55 if (this._targetEvents)
56 WebInspector.EventTarget.removeEventListeners(this._targetEvents); 56 WebInspector.EventTarget.removeEventListeners(this._targetEvents);
57 this._targetEvents = null;
58 }
59 this._target = target; 57 this._target = target;
60 58
61 var domModel = null; 59 var domModel = null;
62 var resourceTreeModel = null; 60 var resourceTreeModel = null;
63 if (target) { 61 if (target) {
64 this._cssModel = WebInspector.CSSModel.fromTarget(target); 62 this._cssModel = WebInspector.CSSModel.fromTarget(target);
65 domModel = WebInspector.DOMModel.fromTarget(target); 63 domModel = WebInspector.DOMModel.fromTarget(target);
66 resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target ); 64 resourceTreeModel = WebInspector.ResourceTreeModel.fromTarget(target );
67 } 65 }
68 66
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 /** 161 /**
164 * @constructor 162 * @constructor
165 * @param {!WebInspector.DOMNode} node 163 * @param {!WebInspector.DOMNode} node
166 * @param {!Map.<string, string>} computedStyle 164 * @param {!Map.<string, string>} computedStyle
167 */ 165 */
168 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle) 166 WebInspector.ComputedStyleModel.ComputedStyle = function(node, computedStyle)
169 { 167 {
170 this.node = node; 168 this.node = node;
171 this.computedStyle = computedStyle; 169 this.computedStyle = computedStyle;
172 } 170 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/common/Object.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698