Bug 182059

Summary: ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, joepeck, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=182065
Attachments:
Description Flags
[PATCH] Proposed Fix none

Chris Dumez
Reported 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
Attachments
[PATCH] Proposed Fix (2.01 KB, patch)
2018-01-24 13:41 PST, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 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.
Joseph Pecoraro
Comment 2 2018-01-24 13:41:44 PST
Created attachment 332190 [details] [PATCH] Proposed Fix
Matt Baker
Comment 3 2018-01-24 13:49:44 PST
Comment on attachment 332190 [details] [PATCH] Proposed Fix r=me
WebKit Commit Bot
Comment 4 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>
WebKit Commit Bot
Comment 5 2018-01-24 14:26:24 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-01-24 14:27:40 PST
Note You need to log in before you can comment on or make changes to this bug.