Bug 182059 - ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
Summary: ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-24 13:08 PST by Chris Dumez
Modified: 2018-01-24 14:47 PST (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (2.01 KB, patch)
2018-01-24 13:41 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-01-24 13:08:55 PST
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
Comment 1 Joseph Pecoraro 2018-01-24 13:28:55 PST
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.
Comment 2 Joseph Pecoraro 2018-01-24 13:41:44 PST
Created attachment 332190 [details]
[PATCH] Proposed Fix
Comment 3 Matt Baker 2018-01-24 13:49:44 PST
Comment on attachment 332190 [details]
[PATCH] Proposed Fix

r=me
Comment 4 WebKit Commit Bot 2018-01-24 14:26:22 PST
Comment on attachment 332190 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 332190

Committed r227572: <https://trac.webkit.org/changeset/227572>
Comment 5 WebKit Commit Bot 2018-01-24 14:26:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-01-24 14:27:40 PST
<rdar://problem/36839642>