WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
200364
Web Inspector: "Inspector.initialized" happens before breakpoints are set
https://bugs.webkit.org/show_bug.cgi?id=200364
Summary
Web Inspector: "Inspector.initialized" happens before breakpoints are set
Joseph Pecoraro
Reported
2019-08-01 15:14:50 PDT
"Inspector.initialized" happens before breakpoints are set This probably means `auto-attach` will not have breakpoints set up appropriately and would miss breakpoints. Notes: • Inspector page loading protocol log: ... [Log] Trace: request (page-338) – {id: 62, method: "Inspector.initialized"} ... [Log] Trace: request (page-338) – {id: 72, method: "Debugger.setBreakpointByUrl", params: Object} [Log] Trace: request (page-338) – {id: 74, method: "Debugger.setBreakpointByUrl", params: Object} ...
Attachments
Patch
(6.82 KB, patch)
2019-08-01 17:32 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Patch
(7.11 KB, patch)
2019-08-02 13:01 PDT
,
Devin Rousso
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Devin Rousso
Comment 1
2019-08-01 17:32:42 PDT
Created
attachment 375370
[details]
Patch
Joseph Pecoraro
Comment 2
2019-08-02 12:36:19 PDT
Comment on
attachment 375370
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=375370&action=review
> Source/WebInspectorUI/UserInterface/Protocol/Target.js:89 > + Promise.all(Target._initializationPromises).then(() => {
Would we want to assert here that `Target._initializationPromises` is not empty? We always expect at least one (Breakpoints) This assert would let us know if we change something and went too early.
> Source/WebInspectorUI/UserInterface/Protocol/Target.js:145 > + promise.then(() => { > + Target._initializationPromises.remove(promise); > + });
Oh, you're removing promises from the list... probably to reduce memory. Maybe we should leave them for the assert, which seems pretty valuable. Or have an assertion: console.assert((Target._initializationPromises.length > 0) || (Target._completedInitializationPromises > 0)); And have this increment `Target._completedInitializationPromises` as well as remove the promise. That keeps removing the promises at the cost of a counter for a useful assertion.
Devin Rousso
Comment 3
2019-08-02 13:01:53 PDT
Created
attachment 375443
[details]
Patch
WebKit Commit Bot
Comment 4
2019-08-02 13:25:07 PDT
Comment on
attachment 375443
[details]
Patch Clearing flags on attachment: 375443 Committed
r248176
: <
https://trac.webkit.org/changeset/248176
>
WebKit Commit Bot
Comment 5
2019-08-02 13:25:09 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6
2019-08-02 13:26:13 PDT
<
rdar://problem/53876805
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug