gInitialLineNumber is set to -1 in ViewSourcePageChild.onPageShow after it has been set in ViewSourcePageChild.setInitialLineNumber
Categories
(Toolkit :: View Source, defect, P3)
Tracking
()
People
(Reporter: kernp25, Assigned: nchevobbe)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
Steps to reproduce:
See attached video.
Expected results:
gInitialLineNumber should have the value that was set in ViewSourcePageChild.setInitialLineNumber
Maybe you know why gInitialLineNumber is set back to -1 in ViewSourcePageChild.onPageShow?
Comment 2•3 years ago
|
||
I don't see the error "this.dropIndicator is null" on my machine. I tried to open Firefox (the lastest Nightly as well as my local m-c build) with default tab, checked the Browser Console (in Multiprocess mode), but no luck.
Any special steps/config I should do to see the error?
Comment 3•3 years ago
•
|
||
Maybe you know why gInitialLineNumber is set back to -1 in ViewSourcePageChild.onPageShow?
Neil, this has been done in bug 1505915, what was the reason?
@kernp25, this patch is related https://phabricator.services.mozilla.com/D165776, right?
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #2)
Any special steps/config I should do to see the error?
Make sure fission.autostart is true in about:config.
Then run this code:
gViewSourceUtils.viewSource({
URL: "resource:///modules/TabsList.jsm",
lineNumber: 527,
});
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #3)
@kernp25, this patch is related https://phabricator.services.mozilla.com/D165776, right?
No! I have added a comment in https://phabricator.services.mozilla.com/D165776
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #3)
Maybe you know why gInitialLineNumber is set back to -1 in ViewSourcePageChild.onPageShow?
Neil, this has been done in bug 1505915, what was the reason?
No! I mean, gInitialLineNumber is already -1, before it checks here, after it has been set in setInitialLineNumber.
Comment 7•3 years ago
|
||
I'm not sure why it is being reset there. It seems like the line to set to -1 could be removed.
I'm guessing the actual bug here is that the line number is reset when going forward/back.
| Assignee | ||
Comment 9•3 years ago
|
||
When a line number is passed, we append it at the end of the view-source URL
so we can then consume it from ViewSourcePageChild.
Having this directly in the URL also opens up the "opens at line" feature to new
consumers (e.g. clicking on JS traces in stdout when devtools are not open could
open a view-source tab at the right location).
Updated•3 years ago
|
Updated•3 years ago
|
Description
•