Open Bug 1473363 Opened 7 years ago Updated 3 years ago

Intervals set by an extension's content script can be cleared by the page

Categories

(WebExtensions :: General, defect, P3)

60 Branch
defect

Tracking

(firefox61 affected, firefox62 affected, firefox63 affected)

Tracking Status
firefox61 --- affected
firefox62 --- affected
firefox63 --- affected

People

(Reporter: kzar, Unassigned)

Details

Attachments

(1 file)

Attached file interval-demo.zip
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36 Steps to reproduce: 1. Install the attached extension 2. Browse to https://static.kzar.co.uk/interval-demo.html 3. Open the developer tools console Actual results: The "Interval..." message should appear in the console once a second. Expected results: The interval is cleared by the page and therefore that message does not show up. Notes: See this Chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=860320
Summary: Intervals set by an extension's content script can be cleaered by the page → Intervals set by an extension's content script can be cleared by the page
I reproduced the issue on Firefox 61.0.1, Firefox 62.0b6 and Nightly 63.0a1 (2018-07-09) [Ubuntu 16.04].
Component: Untriaged → Debugger
Product: Firefox → DevTools
Component: Debugger → Console
Moving this to webExtension. What must happening is that since the extension page lives in content, if calling clearInterval with an id matching the one returned from the setInterval in the extension, I think this makes sense to clear the interval. Dave, what's the use case here? Are there content page clearing intervals with random numbers? Or does it happen that a setInterval from a content script return the same id as a setInterval from the extension?
Component: Console → General
Flags: needinfo?(dave)
Product: DevTools → WebExtensions
(In reply to Nicolas Chevobbe from comment #2) > Dave, what's the use case here? I gave some context about why we care about this [in this comment on the Chromium issue](https://bugs.chromium.org/p/chromium/issues/detail?id=860320#c12), does that help?
Flags: needinfo?(dave)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: