Bug 1461056 - Remove the "remoteBreakpad" symbol rule, because it's no longer needed. r?dthayer
MozReview-Commit-ID: 6c2hWCtZ0UH
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -61,19 +61,19 @@ pref("extensions.autoDisableScopes", 15)
// Scopes to scan for changes at startup.
pref("extensions.startupScanScopes", 0);
// This is where the profiler WebExtension API will look for breakpad symbols.
// NOTE: deliberately http right now since https://symbols.mozilla.org is not supported.
pref("extensions.geckoProfiler.symbols.url", "http://symbols.mozilla.org/");
pref("extensions.geckoProfiler.acceptedExtensionIds", "geckoprofiler@mozilla.com,quantum-foxfooding@mozilla.com");
#if defined(XP_LINUX) || defined (XP_MACOSX)
-pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,remoteBreakpad,nm");
+pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,nm");
#else // defined(XP_WIN)
-pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,remoteBreakpad,dump_syms.exe");
+pref("extensions.geckoProfiler.getSymbolRules", "localBreakpad,dump_syms.exe");
#endif
// Add-on content security policies.
pref("extensions.webextensions.base-content-security-policy", "script-src 'self' https://* moz-extension: blob: filesystem: 'unsafe-eval' 'unsafe-inline'; object-src 'self' https://* moz-extension: blob: filesystem:;");
pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';");
#if defined(XP_WIN) || defined(XP_MACOSX)
--- a/browser/components/extensions/ParseBreakpadSymbols-worker.js
+++ b/browser/components/extensions/ParseBreakpadSymbols-worker.js
@@ -2,26 +2,16 @@
/* vim: set sts=2 sw=2 et tw=80: */
/* eslint-env worker */
"use strict";
importScripts("resource://gre/modules/osfile.jsm");
importScripts("resource:///modules/ParseSymbols.jsm");
-async function fetchSymbolFile(url) {
- const response = await fetch(url);
-
- if (!response.ok) {
- throw new Error(`got error status ${response.status}`);
- }
-
- return response.text();
-}
-
function parse(text) {
const syms = new Map();
// Lines look like this:
//
// PUBLIC 3fc74 0 test_public_symbol
//
// FUNC 40330 8e 0 test_func_symbol
@@ -40,18 +30,16 @@ function parse(text) {
return ParseSymbols.convertSymsMapToExpectedSymFormat(syms, approximateLength);
}
onmessage = async e => {
try {
let text;
if (e.data.filepath) {
text = await OS.File.read(e.data.filepath, {encoding: "utf-8"});
- } else if (e.data.url) {
- text = await fetchSymbolFile(e.data.url);
} else if (e.data.textBuffer) {
text = (new TextDecoder()).decode(e.data.textBuffer);
}
const result = parse(text);
postMessage({result}, result.map(r => r.buffer));
} catch (error) {
postMessage({error: error.toString()});
--- a/browser/components/extensions/parent/ext-geckoProfiler.js
+++ b/browser/components/extensions/parent/ext-geckoProfiler.js
@@ -395,25 +395,23 @@ this.geckoProfiler = class extends Exten
async getSymbols(debugName, breakpadId) {
if (symbolCache.size === 0) {
primeSymbolStore(Services.profiler.sharedLibraries);
}
const cachedLibInfo = symbolCache.get(urlForSymFile(debugName, breakpadId));
- const symbolRules = Services.prefs.getCharPref(PREF_GET_SYMBOL_RULES, "localBreakpad,remoteBreakpad");
+ const symbolRules = Services.prefs.getCharPref(PREF_GET_SYMBOL_RULES, "localBreakpad");
const haveAbsolutePath = cachedLibInfo && OS.Path.split(cachedLibInfo.path).absolute;
// We have multiple options for obtaining symbol information for the given
// binary.
// "localBreakpad" - Use existing symbol dumps stored in the object directory of a local
// Firefox build, generated using `mach buildsymbols` [requires path]
- // "remoteBreakpad" - Use symbol dumps from the Mozilla symbol server [only requires
- // debugName + breakpadId]
// "nm" - Use the command line tool `nm` [linux/mac only, requires path]
// "dump_syms.exe" - Use the tool dump_syms.exe from the object directory [Windows
// only, requires path]
for (const rule of symbolRules.split(",")) {
try {
switch (rule) {
case "localBreakpad":
if (haveAbsolutePath) {
@@ -422,19 +420,16 @@ this.geckoProfiler = class extends Exten
if (filepath) {
// NOTE: here and below, "return await" is used to ensure we catch any
// errors in the promise. A simple return would give the error to the
// caller.
return await parseSym({filepath});
}
}
break;
- case "remoteBreakpad":
- const url = urlForSymFile(debugName, breakpadId);
- return await parseSym({url});
case "nm":
if (haveAbsolutePath) {
const {path, arch} = cachedLibInfo;
return await getSymbolsFromNM(path, arch);
}
break;
case "dump_syms.exe":
if (haveAbsolutePath) {
@@ -456,18 +451,16 @@ this.geckoProfiler = class extends Exten
}
break;
}
} catch (e) {
// Each of our options can go wrong for a variety of reasons, so on failure
// we will try the next one.
// "localBreakpad" will fail if this is not a local build that's running from the object
// directory or if the user hasn't run `mach buildsymbols` on it.
- // "remoteBreakpad" will fail if this is not an official mozilla build (e.g. Nightly) or a
- // known system library.
// "nm" will fail if `nm` is not available.
// "dump_syms.exe" will fail if this is not a local build that's running from the object
// directory, or if dump_syms.exe doesn't exist in the object directory, or if
// dump_syms.exe failed for other reasons.
}
}
throw new Error(`Ran out of options to get symbols from library ${debugName} ${breakpadId}.`);