Web Inspector frequently crashes for me on debug builds when inspecting service workers. The error looks like so: ReferenceError: Can't find variable: DOMAgent (at ScriptSyntaxTree.js:178:22) functionReturnDivot @ ScriptSyntaxTree.js:178:22 updateTypes @ ScriptSyntaxTree.js:217:67 insertAnnotations @ TypeTokenAnnotator.js:62:37 ? @ TypeTokenAnnotator.js:50:43 makeSyntaxTreeAndCallCallback @ Script.js:213:21
DOMAgent won't exist in a ServiceWorker inspector. This is an awkward case where we are checking if the DOMAgent would have had a method just to know if this is an iOS target or not. So just adding a check for DOMAgent itself will be enough for this to work in Page and ServiceWorker contexts.
Created attachment 332190 [details] [PATCH] Proposed Fix
Comment on attachment 332190 [details] [PATCH] Proposed Fix r=me
Comment on attachment 332190 [details] [PATCH] Proposed Fix Clearing flags on attachment: 332190 Committed r227572: <https://trac.webkit.org/changeset/227572>
All reviewed patches have been landed. Closing bug.
<rdar://problem/36839642>