Patch to follow. Repro: - Go to Profiles panel and take a Heap Snapshot - Remove the snapshot profile header from the sidebar via context menu - Run another profile, e.g. Capture Canvas Frame - Observe the exception below: Uncaught TypeError: Cannot call method 'fromFile' of undefined InspectorBackend.js:186 InspectorBackendClass.dispatch InspectorBackend.js:186 InspectorFrontendAPI.dispatchMessage InspectorFrontendAPI.js:198 Stack trace: WebInspector.HeapSnapshotView._updateFilterOptions (HeapSnapshotView.js:724) WebInspector.Object.dispatchEventToListeners (Object.js:101) WebInspector.ProfilesPanel.addProfileHeader (ProfilesPanel.js:580) WebInspector.CanvasProfileType._didStartCapturingFrame (CanvasProfileView.js:496) InspectorBackendClass.dispatch (InspectorBackend.js:186) InspectorFrontendAPI.dispatchMessage (InspectorFrontendAPI.js:198)
Created attachment 185742 [details] Patch
Comment on attachment 185742 [details] Patch We should check that the profile being added is a heap snapshot and ignore all other notifications.
Created attachment 185747 [details] Patch
Comment on attachment 185747 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=185747&action=review > Source/WebCore/inspector/front-end/HeapSnapshotView.js:741 > + if (!event.data || event.data.type !== WebInspector.HeapSnapshotProfileType.TypeId) This one will not work for native snapshots with type WebInspector.NativeSnapshotProfileType.TypeId which reuses the same view so we should probably save profile type from the |profile| argument to HeapSnapshotView and compare with it here.
Created attachment 185754 [details] Patch
Comment on attachment 185754 [details] Patch Clearing flags on attachment: 185754 Committed r141415: <http://trac.webkit.org/changeset/141415>
All reviewed patches have been landed. Closing bug.