The idea is to have an object and be able to add/remove event listeners from it.
Created attachment 140399 [details] Patch
Comment on attachment 140399 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140399&action=review > Source/WebCore/inspector/front-end/HeapSnapshotView.js:872 > + return this._loaded && !this._savedChunksCount && WebInspector.fileManager.canAppendTo(); canAppendTo -> canAppend as there is no argument. > Source/WebCore/inspector/front-end/HeapSnapshotView.js:878 > + _startWritingSnapshot: function(event) I'd leave this function internal to save(), you should be able to remove it as WebInspector.fileManager.removeEventListener(WebInspector.FileManager.EventTypes.SavedURL, startWritingSnapshot, this); > Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:184 > +WebInspector.FileManager = function() Move it to a separate file?
Committed r116222: <http://trac.webkit.org/changeset/116222>
(In reply to comment #2) > (From update of attachment 140399 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=140399&action=review > > > Source/WebCore/inspector/front-end/HeapSnapshotView.js:872 > > + return this._loaded && !this._savedChunksCount && WebInspector.fileManager.canAppendTo(); done > > canAppendTo -> canAppend as there is no argument. > > > Source/WebCore/inspector/front-end/HeapSnapshotView.js:878 > > + _startWritingSnapshot: function(event) > > I'd leave this function internal to save(), you should be able to remove it as WebInspector.fileManager.removeEventListener(WebInspector.FileManager.EventTypes.SavedURL, startWritingSnapshot, this); done > > > Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js:184 > > +WebInspector.FileManager = function() > > Move it to a separate file? done
Created attachment 140403 [details] actually landed