Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

[SourceTree] Missing path segment for resource:// and extension:// URLs #5759

Closed
fvsch opened this issue Mar 22, 2018 · 3 comments
Closed

[SourceTree] Missing path segment for resource:// and extension:// URLs #5759

fvsch opened this issue Mar 22, 2018 · 3 comments

Comments

@fvsch
Copy link
Contributor

fvsch commented Mar 22, 2018

In Firefox Nightly 2018-03-22:

screenshot

Sources on the resource:// and extension:// protocols are missing the first path segment after the protocol (or is that considered a domain maybe?).

Example with two source URLs:

moz-extension://39d86772-227a-3143-96fc-2e1cee5d25ae/content.js
resource://gre/modules/ExtensionContent.jsm

Displayed:

moz-extension://
    content.js

resource://
    modules
        ExtensionContent.jsm

Expected:

moz-extension://39d86772-227a-3143-96fc-2e1cee5d25ae
    content.js

resource://gre
    modules
        ExtensionContent.jsm

or maybe:

moz-extension://
    39d86772-227a-3143-96fc-2e1cee5d25ae
        content.js

resource://
    gre/modules
        ExtensionContent.jsm

PS: please disregard the dark boxes in the screen shot, they're probably due to WebRender.

@claim claim bot added the not-available label Mar 22, 2018
@darkwing darkwing added this to the April 24th milestone Apr 10, 2018
@jasonLaster jasonLaster removed this from the April 24th milestone Apr 19, 2018
@jasonLaster
Copy link
Contributor

Thanks for filing @fvsch. Sorry for the delay. Could you share a good STR?

@fvsch
Copy link
Contributor Author

fvsch commented May 16, 2018

Sure. I’m still seeing this issue, except the top-level moz-extension:// was replaced by an “Extensions” label (with a jigsaw piece icon). Nightly 2018-05-16 on macOS.

First path segment is not rendered for extensions and resource URLs

Steps to reproduce:

  1. Nightly with no extensions or all extensions disabled
  2. Install the Hide Fixed Elements extension.
  3. Load https://example.com/ and open the debugger
  4. Click the “Hide Fixed Elements” toolbar button once

Results:

  • At (3), the debugger Sources should show “This page has no sources”
  • At (4), the debugger Sources should look like this:

screen shot

In the displayed tree:

  • the Extensions > content.js path corresponds to this URL:
    moz-extension://f81fb030-5362-8747-9ef1-bc22cc7cd85d/content.js
  • the resource:// > modules > ExtensionContent.jsm path corresponds to this URL:
    resource://gre/modules/ExtensionContent.jsm

In both cases, the first path segment of the URL (after the protocol) is not rendered in the displayed tree.

As a result, extension scripts get mixed

Steps to reproduce:

  1. Nightly with no extensions or all extensions disabled
  2. Install the Hide Fixed Elements and Search and Replace extensions
  3. Load https://example.com/ and open the debugger
  4. Click the “Hide Fixed Elements” toolbar button once

Results:

  • At (3), the debugger Sources should show two JS files under “Extensions > scripts”
  • At (4), the debugger Sources should show an additional “Extensions > content.js” file

screen shot

Without copying the full URLs to the clipboard, it’s impossible to tell apart scripts from different extensions.

I haven’t found extensions that use the same subpaths, so I don’t know what would happen if two extensions used moz-extension://[id]/content.js: two similar looking entries in the tree, just one, an exception?

@jasonLaster
Copy link
Contributor

Thanks @fvsch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants