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

Unified Diff: ext/background.js

Issue 29527610: Noissue - Add version check for runtime.openOptionsPage for Firefox for Android (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Aug. 25, 2017, 9:19 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
===================================================================
--- a/ext/background.js
+++ b/ext/background.js
@@ -694,21 +694,25 @@
},
onChanged: chrome.storage.onChanged
};
/* Options */
ext.showOptions = callback =>
{
+ let info = require("info");
+
if ("openOptionsPage" in chrome.runtime &&
- // Firefox for Android does have a runtime.openOptionsPage but it
- // doesn't do anything.
+ // Some versions of Firefox for Android before version 57 do have a
+ // runtime.openOptionsPage but it doesn't do anything.
// https://bugzilla.mozilla.org/show_bug.cgi?id=1364945
- require("info").application != "fennec")
+ (info.application != "fennec" ||
+ (parseInt(info.applicationVersion, 10) >= 57 &&
+ info.applicationVersion != "57.0a1")))
Manish Jethani 2017/08/25 09:20:53 This extra check here is specifically for the curr
{
if (!callback)
{
chrome.runtime.openOptionsPage();
}
else
{
chrome.runtime.openOptionsPage(() =>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld