Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 29527662: Noissue - Open options.html directly on Firefox for Android (Closed)

Created:
Aug. 25, 2017, 11:20 a.m. by Manish Jethani
Modified:
Aug. 25, 2017, 12:18 p.m.
Reviewers:
Sebastian Noack
CC:
Wladimir Palant
Base URL:
https://hg.adblockplus.org/adblockpluschrome/
Visibility:
Public.

Description

Noissue - Open options.html directly on Firefox for Android Firefox requires the url parameter passed to tabs.query to be in a specific format: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Match_patterns When this code runs on Firefox for Android, it always sets runtime.lastError to something like "'options.html' is not a valid match pattern" and the returned tabs object is always null (even if options.html is open in a tab). Since it's guaranteed to fail, and since there's no other way to query for the tab that has the options page open ("moz-extension://" is not supported), there's no point in running that code at all. Instead, we open options.html directly. This simplifies the code a bit.

Patch Set 1 #

Total comments: 1

Patch Set 2 : Don't check for tabs being null #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -34 lines) Patch
M ext/background.js View 1 1 chunk +32 lines, -34 lines 0 comments Download

Messages

Total messages: 4
Manish Jethani
Aug. 25, 2017, 11:20 a.m. (2017-08-25 11:20:39 UTC) #1
Manish Jethani
Patch Set 1 Firefox requires the url parameter passed to tabs.query to be in a ...
Aug. 25, 2017, 11:24 a.m. (2017-08-25 11:24:38 UTC) #2
Manish Jethani
Patch Set 2: Don't check for tabs being null Since this will never be called ...
Aug. 25, 2017, 11:27 a.m. (2017-08-25 11:27:25 UTC) #3
Sebastian Noack
Aug. 25, 2017, noon (2017-08-25 12:00:15 UTC) #4
LGTM

Powered by Google App Engine
This is Rietveld