Open Bug 1808153 Opened 3 years ago Updated 3 years ago

gInitialLineNumber is set to -1 in ViewSourcePageChild.onPageShow after it has been set in ViewSourcePageChild.setInitialLineNumber

Categories

(Toolkit :: View Source, defect, P3)

defect

Tracking

()

ASSIGNED

People

(Reporter: kernp25, Assigned: nchevobbe)

References

Details

Attachments

(2 files)

Attached video firefox_TwRnZEJBUC.mp4 —

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?

Flags: needinfo?(odvarko)

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?

Flags: needinfo?(odvarko) → needinfo?(kernp25)

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?

Flags: needinfo?(enndeakin)

(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.

Flags: needinfo?(kernp25)

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.

Flags: needinfo?(enndeakin)
See Also: → 1823373
Duplicate of this bug: 1823373

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).

Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Severity: -- → S3
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: