Uncaught Exception in Web Inspector. Steps to Reproduce: 1. Go to the Audits tab. 2. Enter edit mode. 3. Create a new audit group with any name. 4. Add some code to the single test case and to the setup. 5. Select a different audit group. 6. Encounter this exception and have your data thrown away. Uncaught Exceptions: ----------------------- - TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue') (at AuditTestContentView.js:320:61) saveEditedData @ AuditTestContentView.js:320:61 saveEditedData @ AuditTestCaseContentView.js:326:29 detached @ AuditTestContentView.js:291:36 _didMoveToWindow @ View.js:266:26 _didMoveToParent @ View.js:238:30 removeAllSubviews @ View.js:138:37 detached @ AuditTestGroupContentView.js:228:43 _didMoveToWindow @ View.js:266:26 _didMoveToParent @ View.js:238:30 removeSubview @ View.js:129:30 _hideEntry @ ContentViewContainer.js:464:31 showBackForwardEntryForIndex @ ContentViewContainer.js:161:28 showContentView @ ContentViewContainer.js:141:42 showRepresentedObject @ ContentBrowserTabContentView.js:218:64 ? @ Main.js:1426:41 _treeSelectionDidChange @ AuditNavigationSidebarPanel.js:375:37 dispatch @ Object.js:134:35 dispatchEventToListeners @ Object.js:142:17 _dispatchSelectionDidChangeEvent @ TreeOutline.js:1083:38 selectionControllerSelectionDidChange @ TreeOutline.js:755:46 _updateSelectedItems @ SelectionController.js:458:65 selectItem @ SelectionController.js:155:34 handleItemMouseDown @ SelectionController.js:322:28 _handleMouseDown @ TreeOutline.js:1067:54 _handleMouseDown @ [native code] ----------------------- Notes: Inspected URL: https://webkit.org/ Loading completed: true Frontend User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
<rdar://problem/79312323>
Created attachment 431379 [details] Patch v1.0
Comment on attachment 431379 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=431379&action=review r=me > Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js:319 > + if (!this._setupCodeMirror) NIT: I'd not have this be an early return just so that if more fields are added in the future it makes the diff cleaner :)
Comment on attachment 431379 [details] Patch v1.0 View in context: https://bugs.webkit.org/attachment.cgi?id=431379&action=review >> Source/WebInspectorUI/UserInterface/Views/AuditTestContentView.js:319 >> + if (!this._setupCodeMirror) > > NIT: I'd not have this be an early return just so that if more fields are added in the future it makes the diff cleaner :) Fair enough.
Created attachment 431386 [details] Patch v1.1 - Review nit
Committed r278853 (238799@main): <https://commits.webkit.org/238799@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431386 [details].