WebKit Bugzilla
Attachment 372589 Details for
Bug 199082
: Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199082-20190620150944.patch (text/plain), 1.92 KB, created by
Devin Rousso
on 2019-06-20 15:09:45 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Devin Rousso
Created:
2019-06-20 15:09:45 PDT
Size:
1.92 KB
patch
obsolete
>diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 8f5c739891d81a1459c80f335ddda9e4221840c0..bcfb4f72f7995d397c56c7e34111bdc4fbfeb4b3 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-20 Devin Rousso <drousso@apple.com> >+ >+ Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint >+ https://bugs.webkit.org/show_bug.cgi?id=199082 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/SourceCodeTextEditor.js: >+ (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange): >+ The script syntax tree may be fetched even if the resources hasn't finished parsing (or had >+ a syntax error), so it's possible for it to be `null`. >+ > 2019-06-19 Devin Rousso <drousso@apple.com> > > Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered >diff --git a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >index 8170b50a6e3509a6ffd76e924d91cfd92d657162..6db51afa374b601ac2443c5db48ace06b57d5355 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >+++ b/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js >@@ -1438,6 +1438,12 @@ WI.SourceCodeTextEditor = class SourceCodeTextEditor extends WI.TextEditor > }; > > script.requestScriptSyntaxTree((syntaxTree) => { >+ // After requesting the tree, we still might get a null tree from a parse error. >+ if (!syntaxTree) { >+ callback(null); >+ return; >+ } >+ > // Convert to the position within the inline script before querying the AST. > position = toInlineScriptPosition(position); > let nodes = syntaxTree.containersOfPosition(position);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
mattbaker
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199082
:
372587
|
372589
|
372603