mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Merge fx-team and m-c.
This commit is contained in:
commit
73b47d7635
@ -4052,13 +4052,14 @@ let SessionStoreInternal = {
|
||||
* @returns boolean
|
||||
*/
|
||||
_shouldSaveTabState: function ssi_shouldSaveTabState(aTabState) {
|
||||
// If the tab has only the transient about:blank history entry, no other
|
||||
// If the tab has only a transient about: history entry, no other
|
||||
// session history, and no userTypedValue, then we don't actually want to
|
||||
// store this tab's data.
|
||||
return aTabState.entries.length &&
|
||||
!(aTabState.entries.length == 1 &&
|
||||
aTabState.entries[0].url == "about:blank" &&
|
||||
!aTabState.userTypedValue);
|
||||
(aTabState.entries[0].url == "about:blank" ||
|
||||
aTabState.entries[0].url == "about:newtab") &&
|
||||
!aTabState.userTypedValue);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,8 @@ gcli.addCommand({
|
||||
params: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string"
|
||||
type: "string",
|
||||
manual: gcli.lookup("profilerStartManual")
|
||||
}
|
||||
],
|
||||
|
||||
@ -114,7 +115,8 @@ gcli.addCommand({
|
||||
params: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string"
|
||||
type: "string",
|
||||
manual: gcli.lookup("profilerStopManual")
|
||||
}
|
||||
],
|
||||
|
||||
@ -196,7 +198,8 @@ gcli.addCommand({
|
||||
params: [
|
||||
{
|
||||
name: "name",
|
||||
type: "string"
|
||||
type: "string",
|
||||
manual: gcli.lookup("profilerShowManual")
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -1209,10 +1209,19 @@ profilerCloseDesc=Close the profiler
|
||||
# of the profiler start command.
|
||||
profilerStartDesc=Start profiling
|
||||
|
||||
# LOCALIZATION NOTE (profilerStartManual) A fuller description of the 'profile name'
|
||||
# parameter. This parameter is used to name a newly created profile or to lookup
|
||||
# an existing profile by its name.
|
||||
profilerStartManual=Name of a profile you wish to start.
|
||||
|
||||
# LOCALIZATION NOTE (profilerStop) A very short string used to describe the function
|
||||
# of the profiler stop command.
|
||||
profilerStopDesc=Stop profiling
|
||||
|
||||
# LOCALIZATION NOTE (profilerStopManual) A fuller description of the 'profile name'
|
||||
# parameter. This parameter is used to lookup an existing profile by its name.
|
||||
profilerStopManual=Name of a profile you wish to stop.
|
||||
|
||||
# LOCALIZATION NOTE (profilerList) A very short string used to describe the function
|
||||
# of the profiler list command.
|
||||
profilerListDesc=List all profiles
|
||||
@ -1221,6 +1230,11 @@ profilerListDesc=List all profiles
|
||||
# of the profiler show command.
|
||||
profilerShowDesc=Show individual profile
|
||||
|
||||
# LOCALIZATION NOTE (profilerShowManual) A fuller description of the 'profile name'
|
||||
# parameter. This parameter is used to name a newly created profile or to lookup
|
||||
# an existing profile by its name.
|
||||
profilerShowManual=Name of a profile.
|
||||
|
||||
# LOCALIZATION NOTE (profilerAlreadyStarted) A message that is displayed whenever
|
||||
# an operation cannot be completed because the profile in question has already
|
||||
# been started.
|
||||
|
@ -842,13 +842,6 @@ AddonsProvider.prototype = Object.freeze({
|
||||
continue;
|
||||
}
|
||||
|
||||
let optOutPref = "extensions." + addon.id + ".getAddons.cache.enabled";
|
||||
if (!this._prefs.get(optOutPref, true)) {
|
||||
this._log.debug("Ignoring add-on that's opted out of AMO updates: " +
|
||||
addon.id);
|
||||
continue;
|
||||
}
|
||||
|
||||
let obj = {};
|
||||
for (let field of this.COPY_FIELDS) {
|
||||
obj[field] = addon[field];
|
||||
|
@ -218,6 +218,8 @@ ThreadActor.prototype = {
|
||||
}
|
||||
packet.why = { type: "attached" };
|
||||
|
||||
this._restoreBreakpoints();
|
||||
|
||||
// Send the response to the attach request now (rather than
|
||||
// returning it), because we're going to start a nested event loop
|
||||
// here.
|
||||
@ -740,36 +742,23 @@ ThreadActor.prototype = {
|
||||
|
||||
/**
|
||||
* Get the script and source lists from the debugger.
|
||||
*
|
||||
* TODO bug 637572: we should be dealing with sources directly, not inferring
|
||||
* them through scripts.
|
||||
*/
|
||||
_discoverScriptsAndSources: function TA__discoverScriptsAndSources() {
|
||||
let promises = [];
|
||||
let foundSourceMaps = false;
|
||||
let scripts = this.dbg.findScripts();
|
||||
for (let s of scripts) {
|
||||
if (s.sourceMapURL && !foundSourceMaps) {
|
||||
foundSourceMaps = true;
|
||||
break;
|
||||
}
|
||||
_discoverSources: function TA__discoverSources() {
|
||||
// Only get one script per url.
|
||||
let scriptsByUrl = {};
|
||||
for (let s of this.dbg.findScripts()) {
|
||||
scriptsByUrl[s.url] = s;
|
||||
}
|
||||
if (this._options.useSourceMaps && foundSourceMaps) {
|
||||
for (let s of scripts) {
|
||||
promises.push(this._addScript(s));
|
||||
}
|
||||
return all(promises);
|
||||
}
|
||||
// When source maps are not enabled or not used in the page _addScript is
|
||||
// synchronous, since it doesn't need to wait for fetching source maps, so
|
||||
// resolves immediately. This eliminates a huge slowdown in script-heavy
|
||||
// pages like G+ or chrome debugging, where the GC takes a long time to
|
||||
// clean up after Promise.all.
|
||||
for (let s of scripts) {
|
||||
this._addScriptSync(s);
|
||||
}
|
||||
return resolve(null);
|
||||
|
||||
return all([this.sources.sourcesForScript(scriptsByUrl[s])
|
||||
for (s of Object.keys(scriptsByUrl))]);
|
||||
},
|
||||
|
||||
onSources: function TA_onSources(aRequest) {
|
||||
return this._discoverScriptsAndSources().then(() => {
|
||||
return this._discoverSources().then(() => {
|
||||
return {
|
||||
sources: [s.form() for (s of this.sources.iter())]
|
||||
};
|
||||
@ -1269,6 +1258,7 @@ ThreadActor.prototype = {
|
||||
*/
|
||||
onNewScript: function TA_onNewScript(aScript, aGlobal) {
|
||||
this._addScript(aScript);
|
||||
this.sources.sourcesForScript(aScript);
|
||||
},
|
||||
|
||||
onNewSource: function TA_onNewSource(aSource) {
|
||||
@ -1303,37 +1293,12 @@ ThreadActor.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Add the provided script to the server cache synchronously, without checking
|
||||
* for any declared source maps.
|
||||
*
|
||||
* @param aScript Debugger.Script
|
||||
* The source script that will be stored.
|
||||
* @returns true, if the script was added; false otherwise.
|
||||
* Restore any pre-existing breakpoints to the scripts that we have access to.
|
||||
*/
|
||||
_addScriptSync: function TA__addScriptSync(aScript) {
|
||||
if (!this._allowSource(aScript.url)) {
|
||||
return false;
|
||||
_restoreBreakpoints: function TA__restoreBreakpoints() {
|
||||
for (let s of this.dbg.findScripts()) {
|
||||
this._addScript(s);
|
||||
}
|
||||
|
||||
this.sources.source(aScript.url);
|
||||
// Set any stored breakpoints.
|
||||
let existing = this._breakpointStore[aScript.url];
|
||||
if (existing) {
|
||||
let endLine = aScript.startLine + aScript.lineCount - 1;
|
||||
// Iterate over the lines backwards, so that sliding breakpoints don't
|
||||
// affect the loop.
|
||||
for (let line = existing.length - 1; line >= 0; line--) {
|
||||
let bp = existing[line];
|
||||
// Only consider breakpoints that are not already associated with
|
||||
// scripts, and limit search to the line numbers contained in the new
|
||||
// script.
|
||||
if (bp && !bp.actor.scripts.length &&
|
||||
line >= aScript.startLine && line <= endLine) {
|
||||
this._setBreakpoint(bp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -1341,38 +1306,32 @@ ThreadActor.prototype = {
|
||||
*
|
||||
* @param aScript Debugger.Script
|
||||
* The source script that will be stored.
|
||||
* @returns a promise of true, if the script was added; of false otherwise.
|
||||
* @returns true, if the script was added; false otherwise.
|
||||
*/
|
||||
_addScript: function TA__addScript(aScript) {
|
||||
if (!this._allowSource(aScript.url)) {
|
||||
return resolve(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO bug 637572: we should be dealing with sources directly, not
|
||||
// inferring them through scripts.
|
||||
return this.sources.sourcesForScript(aScript).then(() => {
|
||||
|
||||
// Set any stored breakpoints.
|
||||
let existing = this._breakpointStore[aScript.url];
|
||||
if (existing) {
|
||||
let endLine = aScript.startLine + aScript.lineCount - 1;
|
||||
// Iterate over the lines backwards, so that sliding breakpoints don't
|
||||
// affect the loop.
|
||||
for (let line = existing.length - 1; line >= 0; line--) {
|
||||
let bp = existing[line];
|
||||
// Only consider breakpoints that are not already associated with
|
||||
// scripts, and limit search to the line numbers contained in the new
|
||||
// script.
|
||||
if (bp && !bp.actor.scripts.length &&
|
||||
line >= aScript.startLine && line <= endLine) {
|
||||
this._setBreakpoint(bp);
|
||||
}
|
||||
// Set any stored breakpoints.
|
||||
let existing = this._breakpointStore[aScript.url];
|
||||
if (existing) {
|
||||
let endLine = aScript.startLine + aScript.lineCount - 1;
|
||||
// Iterate over the lines backwards, so that sliding breakpoints don't
|
||||
// affect the loop.
|
||||
for (let line = existing.length - 1; line >= aScript.startLine; line--) {
|
||||
let bp = existing[line];
|
||||
// Only consider breakpoints that are not already associated with
|
||||
// scripts, and limit search to the line numbers contained in the new
|
||||
// script.
|
||||
if (bp && !bp.actor.scripts.length && line <= endLine) {
|
||||
this._setBreakpoint(bp);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
ThreadActor.prototype.requestTypes = {
|
||||
@ -2638,7 +2597,8 @@ ThreadSources.prototype = {
|
||||
return [
|
||||
this.source(s, aSourceMap) for (s of aSourceMap.sources)
|
||||
];
|
||||
}, (e) => {
|
||||
})
|
||||
.then(null, (e) => {
|
||||
reportError(e);
|
||||
delete this._sourceMaps[this._normalize(aScript.sourceMapURL, aScript.url)];
|
||||
delete this._sourceMapsByGeneratedSource[aScript.url];
|
||||
@ -2682,7 +2642,7 @@ ThreadSources.prototype = {
|
||||
return this._sourceMaps[aAbsSourceMapURL];
|
||||
} else {
|
||||
let promise = fetch(aAbsSourceMapURL).then((rawSourceMap) => {
|
||||
let map = new SourceMapConsumer(rawSourceMap);
|
||||
let map = new SourceMapConsumer(rawSourceMap);
|
||||
let base = aAbsSourceMapURL.replace(/\/[^\/]+$/, '/');
|
||||
if (base.indexOf("data:") !== 0) {
|
||||
map.sourceRoot = map.sourceRoot
|
||||
|
@ -30,7 +30,7 @@ function createRootActor()
|
||||
};
|
||||
|
||||
actor.thread.requestTypes["scripts"] = function (aRequest) {
|
||||
return this._discoverScriptsAndSources().then(function () {
|
||||
return this._discoverSources().then(function () {
|
||||
let scripts = [];
|
||||
for (let s of this.dbg.findScripts()) {
|
||||
if (!s.url) {
|
||||
|
Loading…
Reference in New Issue
Block a user