[Invalid] NS Classic causes ServiceWorker-related WebExtension content script to crash the tab

Bug reports and enhancement requests
Post Reply
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

[Invalid] NS Classic causes ServiceWorker-related WebExtension content script to crash the tab

Post by barbaz »

Waterfox 56.2.7.1 (Linux x86_64)
NoScript 5.1.9rc1
new profile

STR:

1) install NoScript

2) install this test WebExtension -

manifest.json

Code: Select all

{
  "manifest_version": 2,
  "name": "ServiceWorker content script test",
  "version": "1",
  "author":"barbaz",

  "permissions": [
    "<all_urls>"
  ],

  "content_scripts": [
    {
      "js": ["content.js"],
      "matches": ["<all_urls>"],
      "run_at": "document_idle",
      "all_frames": true,
      "match_about_blank": true
    }
  ],

  "applications": {
    "gecko": {
      "id": "{e3a8bcb2-637c-4b77-a7c6-89be91615514}"
    }
  }
}
content.js

Code: Select all

if (navigator.serviceWorker) {
  navigator.serviceWorker.ready.then((reg) => {
    alert('A ServiceWorker is ready.');
  });
}
3) visit a page that registers a ServiceWorker (I used a test page on my local server)

Expected results: alert box

Actual results: Waterfox says "Gah. Your tab just crashed."

Firefox 56.0.2 works as expected, no tab crash. Is this a NoScript issue or a Waterfox issue?
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: NS Classic causes ServiceWorker-related WebExtension content script to crash the tab

Post by barbaz »

Well, this is really odd. In my custom builds of Waterfox, 56.0.3 has no issue here, while 56.0.4.1 crashes. But the official Waterfox builds are crashing at least as far back as 56.0.1.

I don't remember what local Waterfox patches I had at that time, if any. But I'm sure they would have been completely unrelated to this.

Image
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: NS Classic causes ServiceWorker-related WebExtension content script to crash the tab

Post by barbaz »

Hmm.

Custom Waterfox 56.0.3 was compiled with gcc 6.3.1 (rh-devtoolset-6)
Custom Waterfox 56.0.4.1 was compiled with clang 3.9.1 (this is more like the official Waterfox builds)

Could this be related? Maybe I need to try a build of 56.2.7.1 compiled with gcc??

(In case this is related, some additional info: my custom Waterfox 56.2.7.1 build was compiled with clang 5.0.1)
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 10841
Joined: Sat Aug 03, 2013 5:45 pm

Re: NS Classic causes ServiceWorker-related WebExtension content script to crash the tab

Post by barbaz »

barbaz wrote: Sun Mar 03, 2019 7:43 pm Maybe I need to try a build of 56.2.7.1 compiled with gcc??
Bingo. Waterfox 56.2.7.1 compiled with gcc 7.3.0 does not crash.

So I guess this is not a NoScript issue. Sorry about this.
*Always* check the changelogs BEFORE updating that important software!
-
grahamperrin
Posts: 11
Joined: Sun Jan 27, 2019 5:39 pm

Cross reference

Post by grahamperrin »

Mozilla/5.0 (X11; FreeBSD amd64; rv:65.0) Gecko/20100101 Firefox/65.0 Waterfox/56.2.7
Post Reply