Set a thread to directory root, close then reopen debugger fails to show the directory root
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: chujunlu, Assigned: chujunlu)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36
Steps to reproduce:
1.Open http://dbg-workers.glitch.me/ and open debugger
2.Right click at "Main Thread" in source panel
3.Click "Set directory root"
4.Close debugger
5.Reopen debugger
Actual results:
Root header shows "thread19".
Message "This page has no sources" displays.
Expected results:
Root header shows "Main Thread".
Its sources are shown.
When we set a thread to directory root, item.path
, which is equal to thread.actor
in a thread's case, is used as the project directory root and stored in prefs
. When debugger is closed and opened again, thread.actor
will be different. But the debugger state is initialized with an old directory root. e.g. directory root is server0.conn0.child1/thread19
. Thread is now server0.conn1.child1/thread19
. Then we check root against threadActors
to get thread.name
and sources. It will fail.
To get expected results, a naive thought I had was when initialized source state, if prefs.projectDirectoryRoot
is a thread.actor
, we bump up connX
by 1, that was the only change I saw in thread.actor
. This solution sounds error-prone.
I also thought about removing this behavior for threads, meaning when we set a thread
to root, we don't store the root in prefs
. When we reopen the debugger, it doesn't show a thread as root.
Setting a child directory under a thread to root, and reopen debugger won't cause the same issue, since thread.actor
is removed from a child's path, and we only use what's left as root.
Let me know what's your take on this.
Comment 2•5 years ago
|
||
The priority flag is not set for this bug.
:jlast, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 3•5 years ago
|
||
Thanks for the report and detailed analysis!
I can easily reproduce on my machine (Win10, Firefox Nightly) using your STRs.
Honza
Updated•4 years ago
|
When we set a thread to directory root, item.path
, which is equal to thread.actor
in a thread's case, is used as the project directory root and stored in prefs
. When debugger is closed and opened again, thread.actor
will be different. But the debugger state is initialized with an old directory root. For example, directory root is server0.conn0.child1/thread19
. Thread is now "server0.conn1.child1/thread19."
Updated•4 years ago
|
Comment 5•4 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:chujunlu, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•4 years ago
|
||
Jason, could you please look at the patch, thanks.
Honza
Comment 7•4 years ago
|
||
Yep, sorry chujun
Pushed by jlaster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d2b4e791acf5 Do not store root in prefs when set a thread actor to project root r=jlast
Comment 10•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•