forked from mirrors/gecko-dev
Bug 1561435 - Fix linting errors for browser/, r=standard8
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35950 --HG-- extra : source : ff6aa88097df9836d93d6aa5554ffcd160f07167 extra : intermediate-source : 2130a9484ece03d835939359c4a07966aa8d790c
This commit is contained in:
parent
6456074375
commit
ad522e3aae
31 changed files with 46 additions and 43 deletions
|
|
@ -611,6 +611,7 @@ var gIdentityHandler = {
|
||||||
_hasCustomRoot() {
|
_hasCustomRoot() {
|
||||||
let issuerCert = null;
|
let issuerCert = null;
|
||||||
// Walk the whole chain to get the last cert.
|
// Walk the whole chain to get the last cert.
|
||||||
|
// eslint-disable-next-line no-empty
|
||||||
for (issuerCert of this._secInfo.succeededCertChain.getEnumerator()) {
|
for (issuerCert of this._secInfo.succeededCertChain.getEnumerator()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3119,7 +3119,7 @@ async function BrowserViewSourceOfDocument(aArgsOrDocument) {
|
||||||
// Deprecated API - callers should pass args object instead.
|
// Deprecated API - callers should pass args object instead.
|
||||||
if (Cu.isCrossProcessWrapper(doc)) {
|
if (Cu.isCrossProcessWrapper(doc)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"BrowserViewSourceOfDocument cannot accept a CPOW " + "as a document."
|
"BrowserViewSourceOfDocument cannot accept a CPOW as a document."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3366,8 +3366,8 @@ function losslessDecodeURI(aURI) {
|
||||||
// Encode invisible characters (C0/C1 control characters, U+007F [DEL],
|
// Encode invisible characters (C0/C1 control characters, U+007F [DEL],
|
||||||
// U+00A0 [no-break space], line and paragraph separator,
|
// U+00A0 [no-break space], line and paragraph separator,
|
||||||
// object replacement character) (bug 452979, bug 909264)
|
// object replacement character) (bug 452979, bug 909264)
|
||||||
// eslint-disable-next-line no-control-regex
|
|
||||||
value = value.replace(
|
value = value.replace(
|
||||||
|
// eslint-disable-next-line no-control-regex
|
||||||
/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\ufffc]/g,
|
/[\u0000-\u001f\u007f-\u00a0\u2028\u2029\ufffc]/g,
|
||||||
encodeURIComponent
|
encodeURIComponent
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,11 @@ add_task(async function test_content_and_chrome_selection() {
|
||||||
|
|
||||||
add_task(async function test_active_selection_switches_properly() {
|
add_task(async function test_active_selection_switches_properly() {
|
||||||
let testPage1 =
|
let testPage1 =
|
||||||
|
// eslint-disable-next-line no-useless-concat
|
||||||
"data:text/html," +
|
"data:text/html," +
|
||||||
'<textarea id="textarea">Write something here</textarea>';
|
'<textarea id="textarea">Write something here</textarea>';
|
||||||
let testPage2 =
|
let testPage2 =
|
||||||
|
// eslint-disable-next-line no-useless-concat
|
||||||
"data:text/html," + '<textarea id="textarea">Nothing available</textarea>';
|
"data:text/html," + '<textarea id="textarea">Nothing available</textarea>';
|
||||||
let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
|
let DOMWindowUtils = EventUtils._getDOMWindowUtils(window);
|
||||||
let selectedText;
|
let selectedText;
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ function recordEvent(aName) {
|
||||||
"got events and progress notifications in expected order"
|
"got events and progress notifications in expected order"
|
||||||
);
|
);
|
||||||
|
|
||||||
// eslint-disable-next-line no-shadow
|
|
||||||
executeSoon(
|
executeSoon(
|
||||||
|
// eslint-disable-next-line no-shadow
|
||||||
function(tab) {
|
function(tab) {
|
||||||
gBrowser.removeTab(tab);
|
gBrowser.removeTab(tab);
|
||||||
gBrowser.removeTabsProgressListener(progressListener);
|
gBrowser.removeTabsProgressListener(progressListener);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ add_task(async function findbar_test() {
|
||||||
|
|
||||||
ok(
|
ok(
|
||||||
!gFindBar.hidden,
|
!gFindBar.hidden,
|
||||||
"the Find bar isn't hidden after the location of a " + "subdocument changes"
|
"the Find bar isn't hidden after the location of a subdocument changes"
|
||||||
);
|
);
|
||||||
|
|
||||||
let findBarClosePromise = BrowserTestUtils.waitForEvent(
|
let findBarClosePromise = BrowserTestUtils.waitForEvent(
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ function test() {
|
||||||
is(
|
is(
|
||||||
gHistorySwipeAnimation.active,
|
gHistorySwipeAnimation.active,
|
||||||
false,
|
false,
|
||||||
"History swipe animation support " + "was successfully uninitialized"
|
"History swipe animation support was successfully uninitialized"
|
||||||
);
|
);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ add_task(async function shareURLAddressBar() {
|
||||||
// Click "Add to Address Bar"
|
// Click "Add to Address Bar"
|
||||||
contextMenuPromise = promisePanelHidden("pageActionContextMenu");
|
contextMenuPromise = promisePanelHidden("pageActionContextMenu");
|
||||||
let ctxMenuButton = document.querySelector(
|
let ctxMenuButton = document.querySelector(
|
||||||
"#pageActionContextMenu " + ".pageActionContextMenuItem"
|
"#pageActionContextMenu .pageActionContextMenuItem"
|
||||||
);
|
);
|
||||||
EventUtils.synthesizeMouseAtCenter(ctxMenuButton, {});
|
EventUtils.synthesizeMouseAtCenter(ctxMenuButton, {});
|
||||||
await contextMenuPromise;
|
await contextMenuPromise;
|
||||||
|
|
@ -134,7 +134,7 @@ add_task(async function shareURLAddressBar() {
|
||||||
|
|
||||||
contextMenuPromise = promisePanelHidden("pageActionContextMenu");
|
contextMenuPromise = promisePanelHidden("pageActionContextMenu");
|
||||||
ctxMenuButton = document.querySelector(
|
ctxMenuButton = document.querySelector(
|
||||||
"#pageActionContextMenu " + ".pageActionContextMenuItem"
|
"#pageActionContextMenu .pageActionContextMenuItem"
|
||||||
);
|
);
|
||||||
EventUtils.synthesizeMouseAtCenter(ctxMenuButton, {});
|
EventUtils.synthesizeMouseAtCenter(ctxMenuButton, {});
|
||||||
await contextMenuPromise;
|
await contextMenuPromise;
|
||||||
|
|
|
||||||
|
|
@ -389,7 +389,7 @@ add_task(async function test_cannot_clear_history() {
|
||||||
);
|
);
|
||||||
ok(
|
ok(
|
||||||
cb.length == 1 && !cb[0].disabled,
|
cb.length == 1 && !cb[0].disabled,
|
||||||
"There is formdata, checkbox to " + "clear formdata should be enabled."
|
"There is formdata, checkbox to clear formdata should be enabled."
|
||||||
);
|
);
|
||||||
|
|
||||||
cb = this.win.document.querySelectorAll(
|
cb = this.win.document.querySelectorAll(
|
||||||
|
|
@ -397,7 +397,7 @@ add_task(async function test_cannot_clear_history() {
|
||||||
);
|
);
|
||||||
ok(
|
ok(
|
||||||
cb.length == 1 && !cb[0].disabled,
|
cb.length == 1 && !cb[0].disabled,
|
||||||
"There is history, checkbox to " + "clear history should be enabled."
|
"There is history, checkbox to clear history should be enabled."
|
||||||
);
|
);
|
||||||
|
|
||||||
this.checkAllCheckboxes();
|
this.checkAllCheckboxes();
|
||||||
|
|
|
||||||
|
|
@ -891,6 +891,7 @@ nsDefaultCommandLineHandler.prototype = {
|
||||||
Services.dirsvc.get("ProfD", Ci.nsIFile);
|
Services.dirsvc.get("ProfD", Ci.nsIFile);
|
||||||
this._haveProfile = true;
|
this._haveProfile = true;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
// eslint-disable-next-line no-empty
|
||||||
while ((ar = cmdLine.handleFlagWithParam("url", false))) {}
|
while ((ar = cmdLine.handleFlagWithParam("url", false))) {}
|
||||||
cmdLine.preventDefault = true;
|
cmdLine.preventDefault = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,10 @@ async function test_cookie_settings({
|
||||||
"about:preferences"
|
"about:preferences"
|
||||||
);
|
);
|
||||||
await tab.linkedBrowser.contentWindow.gotoPref("panePrivacy");
|
await tab.linkedBrowser.contentWindow.gotoPref("panePrivacy");
|
||||||
// eslint-disable-next-line no-shadow
|
|
||||||
await ContentTask.spawn(
|
await ContentTask.spawn(
|
||||||
tab.linkedBrowser,
|
tab.linkedBrowser,
|
||||||
{ cookiesEnabled, cookieSettingsLocked },
|
{ cookiesEnabled, cookieSettingsLocked },
|
||||||
|
// eslint-disable-next-line no-shadow
|
||||||
async function({ cookiesEnabled, cookieSettingsLocked }) {
|
async function({ cookiesEnabled, cookieSettingsLocked }) {
|
||||||
let deleteOnCloseCheckbox = content.document.getElementById(
|
let deleteOnCloseCheckbox = content.document.getElementById(
|
||||||
"deleteOnClose"
|
"deleteOnClose"
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ async function test_popup_blocker_disabled({ disabled, locked }) {
|
||||||
gBrowser,
|
gBrowser,
|
||||||
"about:preferences#privacy"
|
"about:preferences#privacy"
|
||||||
);
|
);
|
||||||
// eslint-disable-next-line no-shadow
|
|
||||||
await ContentTask.spawn(
|
await ContentTask.spawn(
|
||||||
tab.linkedBrowser,
|
tab.linkedBrowser,
|
||||||
{ disabled, locked },
|
{ disabled, locked },
|
||||||
|
// eslint-disable-next-line no-shadow
|
||||||
async function({ disabled, locked }) {
|
async function({ disabled, locked }) {
|
||||||
let checkbox = content.document.getElementById("popupPolicy");
|
let checkbox = content.document.getElementById("popupPolicy");
|
||||||
is(
|
is(
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@ async function test_reset_disabled({ disabled }) {
|
||||||
gBrowser,
|
gBrowser,
|
||||||
"about:support"
|
"about:support"
|
||||||
);
|
);
|
||||||
// eslint-disable-next-line no-shadow
|
|
||||||
await ContentTask.spawn(tab.linkedBrowser, { disabled }, async function({
|
await ContentTask.spawn(tab.linkedBrowser, { disabled }, async function({
|
||||||
|
// eslint-disable-next-line no-shadow
|
||||||
disabled,
|
disabled,
|
||||||
}) {
|
}) {
|
||||||
let resetBox = content.document.getElementById("reset-box");
|
let resetBox = content.document.getElementById("reset-box");
|
||||||
|
|
|
||||||
|
|
@ -1186,8 +1186,8 @@ class WindowManager extends WindowManagerBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
extensions.on("startup", (type, extension) => {
|
extensions.on("startup", (type, extension) => {
|
||||||
// eslint-disable-line mozilla/balanced-listeners
|
|
||||||
defineLazyGetter(extension, "tabManager", () => new TabManager(extension));
|
defineLazyGetter(extension, "tabManager", () => new TabManager(extension));
|
||||||
defineLazyGetter(
|
defineLazyGetter(
|
||||||
extension,
|
extension,
|
||||||
|
|
|
||||||
|
|
@ -256,12 +256,10 @@ this.browserAction = class extends ExtensionAPI {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
this.tabContext.on(
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
"tab-select", // eslint-disable-line mozilla/balanced-listeners
|
this.tabContext.on("tab-select", (evt, tab) => {
|
||||||
(evt, tab) => {
|
this.updateWindow(tab.ownerGlobal);
|
||||||
this.updateWindow(tab.ownerGlobal);
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
this.widget = widget;
|
this.widget = widget;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -478,8 +478,8 @@ var gMenuBuilder = {
|
||||||
{ once: true }
|
{ once: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
element.addEventListener("click", event => {
|
element.addEventListener("click", event => {
|
||||||
// eslint-disable-line mozilla/balanced-listeners
|
|
||||||
if (
|
if (
|
||||||
event.target !== event.currentTarget ||
|
event.target !== event.currentTarget ||
|
||||||
// Ignore menu items that are usually not clickeable,
|
// Ignore menu items that are usually not clickeable,
|
||||||
|
|
|
||||||
|
|
@ -129,12 +129,10 @@ this.sidebarAction = class extends ExtensionAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
this.tabContext.on(
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
"tab-select", // eslint-disable-line mozilla/balanced-listeners
|
this.tabContext.on("tab-select", (evt, tab) => {
|
||||||
(evt, tab) => {
|
this.updateWindow(tab.ownerGlobal);
|
||||||
this.updateWindow(tab.ownerGlobal);
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
let install = this.extension.startupReason === "ADDON_INSTALL";
|
let install = this.extension.startupReason === "ADDON_INSTALL";
|
||||||
for (let window of windowTracker.browserWindows()) {
|
for (let window of windowTracker.browserWindows()) {
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ add_task(async function testIndexedDB() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function contentScript() {
|
function contentScript() {
|
||||||
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
msg => {
|
msg => {
|
||||||
// eslint-disable-line mozilla/balanced-listeners
|
|
||||||
browser.test.sendMessage("indexedDBCreated");
|
browser.test.sendMessage("indexedDBCreated");
|
||||||
},
|
},
|
||||||
true
|
true
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,10 @@ add_task(async function testServiceWorkers() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function contentScript() {
|
function contentScript() {
|
||||||
|
// eslint-disable-next-line mozilla/balanced-listeners
|
||||||
window.addEventListener(
|
window.addEventListener(
|
||||||
"message",
|
"message",
|
||||||
msg => {
|
msg => {
|
||||||
// eslint-disable-line mozilla/balanced-listeners
|
|
||||||
if (msg.data == "serviceWorkerRegistered") {
|
if (msg.data == "serviceWorkerRegistered") {
|
||||||
browser.runtime.sendMessage("serviceWorkerRegistered");
|
browser.runtime.sendMessage("serviceWorkerRegistered");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ add_task(async function testWindowCreate() {
|
||||||
browser.test.log(
|
browser.test.log(
|
||||||
`Got mismatched size (${JSON.stringify(
|
`Got mismatched size (${JSON.stringify(
|
||||||
expected
|
expected
|
||||||
)} != ${JSON.stringify(geom)}). ` + `Retrying after a short delay.`
|
)} != ${JSON.stringify(geom)}). Retrying after a short delay.`
|
||||||
);
|
);
|
||||||
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 200));
|
await new Promise(resolve => setTimeout(resolve, 200));
|
||||||
|
|
|
||||||
|
|
@ -243,8 +243,8 @@ export default class PaymentDialog extends HandleEventMixin(
|
||||||
*
|
*
|
||||||
* @param {object} state - See `PaymentsStore.setState`
|
* @param {object} state - See `PaymentsStore.setState`
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line complexity
|
||||||
async setStateFromParent(state) {
|
async setStateFromParent(state) {
|
||||||
// eslint-disable-line complexity
|
|
||||||
let oldAddresses = paymentRequest.getAddresses(
|
let oldAddresses = paymentRequest.getAddresses(
|
||||||
this.requestStore.getState()
|
this.requestStore.getState()
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ var testForgetThisSiteVisibility = async function(selectionCount) {
|
||||||
hideForgetThisSite,
|
hideForgetThisSite,
|
||||||
`The Forget this site menu item should ${
|
`The Forget this site menu item should ${
|
||||||
hideForgetThisSite ? "" : "not "
|
hideForgetThisSite ? "" : "not "
|
||||||
}` + ` be hidden with ${selectionCount} items selected`
|
} be hidden with ${selectionCount} items selected`
|
||||||
);
|
);
|
||||||
|
|
||||||
// Close the context menu.
|
// Close the context menu.
|
||||||
|
|
|
||||||
|
|
@ -393,11 +393,13 @@ var treeView = {
|
||||||
if (item.open) {
|
if (item.open) {
|
||||||
// remove this window's tab rows from the view
|
// remove this window's tab rows from the view
|
||||||
var thisLevel = this.getLevel(idx);
|
var thisLevel = this.getLevel(idx);
|
||||||
|
/* eslint-disable no-empty */
|
||||||
for (
|
for (
|
||||||
var t = idx + 1;
|
var t = idx + 1;
|
||||||
t < gTreeData.length && this.getLevel(t) > thisLevel;
|
t < gTreeData.length && this.getLevel(t) > thisLevel;
|
||||||
t++
|
t++
|
||||||
) {}
|
) {}
|
||||||
|
/* eslint-disable no-empty */
|
||||||
var deletecount = t - idx - 1;
|
var deletecount = t - idx - 1;
|
||||||
gTreeData.splice(idx + 1, deletecount);
|
gTreeData.splice(idx + 1, deletecount);
|
||||||
this.treeBox.rowCountChanged(idx + 1, -deletecount);
|
this.treeBox.rowCountChanged(idx + 1, -deletecount);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ const TAB_SHENTRY = { url: TAB_URL, triggeringPrincipal_base64 };
|
||||||
const TAB_STATE = { entries: [TAB_SHENTRY], formdata: TAB_FORMDATA };
|
const TAB_STATE = { entries: [TAB_SHENTRY], formdata: TAB_FORMDATA };
|
||||||
|
|
||||||
const FRAME_SCRIPT =
|
const FRAME_SCRIPT =
|
||||||
|
// eslint-disable-next-line no-useless-concat
|
||||||
"data:," + "content.document.getElementById('errorTryAgain').click()";
|
"data:," + "content.document.getElementById('errorTryAgain').click()";
|
||||||
|
|
||||||
add_task(async function() {
|
add_task(async function() {
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,7 @@ const BCH_TESTS = [
|
||||||
actions: "silent",
|
actions: "silent",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
description:
|
description: "update with 'silent showURL extra' for actions and openURL",
|
||||||
"update with 'silent showURL extra' " + "for actions and openURL",
|
|
||||||
actions: "silent showURL extra",
|
actions: "silent showURL extra",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -246,8 +246,8 @@ add_task(async function test_show_original() {
|
||||||
|
|
||||||
add_task(async function test_language_change() {
|
add_task(async function test_language_change() {
|
||||||
// This is run 4 times, the total additions are checked afterwards.
|
// This is run 4 times, the total additions are checked afterwards.
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
for (let i of Array(4)) {
|
for (let i of Array(4)) {
|
||||||
// eslint-disable-line no-unused-vars
|
|
||||||
let tab = await offerTranslationFor("<h1>Hallo Welt!</h1>", "fr");
|
let tab = await offerTranslationFor("<h1>Hallo Welt!</h1>", "fr");
|
||||||
let browser = tab.linkedBrowser;
|
let browser = tab.linkedBrowser;
|
||||||
// In the offer state, translation is executed by the Translate button,
|
// In the offer state, translation is executed by the Translate button,
|
||||||
|
|
|
||||||
|
|
@ -140,9 +140,9 @@ var UrlbarUtils = {
|
||||||
!PrivateBrowsingUtils.isWindowPrivate(window) &&
|
!PrivateBrowsingUtils.isWindowPrivate(window) &&
|
||||||
url &&
|
url &&
|
||||||
!url.includes(" ") &&
|
!url.includes(" ") &&
|
||||||
|
// eslint-disable-next-line no-control-regex
|
||||||
!/[\x00-\x1F]/.test(url)
|
!/[\x00-\x1F]/.test(url)
|
||||||
) {
|
) {
|
||||||
// eslint-disable-line no-control-regex
|
|
||||||
PlacesUIUtils.markPageAsTyped(url);
|
PlacesUIUtils.markPageAsTyped(url);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -274,6 +274,7 @@ var UrlbarUtils = {
|
||||||
let ranges = [];
|
let ranges = [];
|
||||||
for (let index = hits.indexOf(1); index >= 0 && index < hits.length; ) {
|
for (let index = hits.indexOf(1); index >= 0 && index < hits.length; ) {
|
||||||
let len = 0;
|
let len = 0;
|
||||||
|
// eslint-disable-next-line no-empty
|
||||||
for (let j = index; j < hits.length && hits[j]; ++j, ++len) {}
|
for (let j = index; j < hits.length && hits[j]; ++j, ++len) {}
|
||||||
ranges.push([index, len]);
|
ranges.push([index, len]);
|
||||||
// Move to the next 1.
|
// Move to the next 1.
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ add_task(async function searchWith() {
|
||||||
Assert.notEqual(
|
Assert.notEqual(
|
||||||
engineName,
|
engineName,
|
||||||
(await Services.search.getDefault()).name,
|
(await Services.search.getDefault()).name,
|
||||||
"Sanity check: First one-off engine should not be " + "the current engine"
|
"Sanity check: First one-off engine should not be the current engine"
|
||||||
);
|
);
|
||||||
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
result = await UrlbarTestUtils.getDetailsOfResultAt(window, 0);
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
|
|
|
||||||
|
|
@ -595,7 +595,7 @@ this.FormAutofillHeuristics = {
|
||||||
fieldScanner.parsingIndex > 0
|
fieldScanner.parsingIndex > 0
|
||||||
) {
|
) {
|
||||||
const regExpTelExtension = new RegExp(
|
const regExpTelExtension = new RegExp(
|
||||||
"\\bext|ext\\b|extension" + "|ramal", // pt-BR, pt-PT
|
"\\bext|ext\\b|extension|ramal", // pt-BR, pt-PT
|
||||||
"iu"
|
"iu"
|
||||||
);
|
);
|
||||||
const previousField = fieldScanner.getFieldDetailByIndex(
|
const previousField = fieldScanner.getFieldDetailByIndex(
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ function getIntPref(aPref, aDefaultValue) {
|
||||||
function isDefaultHandler() {
|
function isDefaultHandler() {
|
||||||
if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
|
if (Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"isDefaultHandler should only get called in the parent " + "process."
|
"isDefaultHandler should only get called in the parent process."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return PdfjsChromeUtils.isDefaultHandlerApp();
|
return PdfjsChromeUtils.isDefaultHandlerApp();
|
||||||
|
|
@ -115,7 +115,7 @@ var PdfJs = {
|
||||||
Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT
|
Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"PdfJs.init should only get called " + "in the parent process."
|
"PdfJs.init should only get called in the parent process."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
PdfjsChromeUtils.init();
|
PdfjsChromeUtils.init();
|
||||||
|
|
@ -280,7 +280,7 @@ var PdfJs = {
|
||||||
Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT
|
Services.appinfo.processType !== Services.appinfo.PROCESS_TYPE_DEFAULT
|
||||||
) {
|
) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Only the parent process should be observing PDF " + "handler changes."
|
"Only the parent process should be observing PDF handler changes."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
var EXPORTED_SYMBOLS = ["NetworkManager"];
|
var EXPORTED_SYMBOLS = ["NetworkManager"];
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
function log(aMsg) {
|
function log(aMsg) {
|
||||||
// eslint-disable-line no-unused-vars
|
|
||||||
var msg = "PdfJsNetwork.jsm: " + (aMsg.join ? aMsg.join("") : aMsg);
|
var msg = "PdfJsNetwork.jsm: " + (aMsg.join ? aMsg.join("") : aMsg);
|
||||||
Services.console.logStringMessage(msg);
|
Services.console.logStringMessage(msg);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ var PdfjsChromeUtils = {
|
||||||
let browser = aEvent.currentTarget.browser;
|
let browser = aEvent.currentTarget.browser;
|
||||||
if (!this._browsers.has(browser)) {
|
if (!this._browsers.has(browser)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"FindEventManager was not bound " + "for the current browser."
|
"FindEventManager was not bound for the current browser."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Only forward the events if the current browser is a registered browser.
|
// Only forward the events if the current browser is a registered browser.
|
||||||
|
|
@ -251,7 +251,7 @@ var PdfjsChromeUtils = {
|
||||||
let browser = aMsg.target;
|
let browser = aMsg.target;
|
||||||
if (this._browsers.has(browser)) {
|
if (this._browsers.has(browser)) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"FindEventManager was bound 2nd time " + "without unbinding it first."
|
"FindEventManager was bound 2nd time without unbinding it first."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue