mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1124106 - Don't show unnamed eval sources in the debugger. r=ejpbruel
This commit is contained in:
parent
a43ebf026a
commit
c415983976
@ -136,9 +136,8 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
|
||||
* - staged: true to stage the item to be appended later
|
||||
*/
|
||||
addSource: function(aSource, aOptions = {}) {
|
||||
if (!(aSource.url || aSource.introductionUrl)) {
|
||||
// These would be most likely eval scripts introduced in inline
|
||||
// JavaScript in HTML, and we don't show those yet (bug 1097873)
|
||||
if (!aSource.url) {
|
||||
// We don't show any unnamed eval scripts yet (see bug 1124106)
|
||||
return;
|
||||
}
|
||||
|
||||
@ -170,21 +169,10 @@ SourcesView.prototype = Heritage.extend(WidgetMethods, {
|
||||
},
|
||||
|
||||
_parseUrl: function(aSource) {
|
||||
let fullUrl = aSource.url || aSource.introductionUrl;
|
||||
let fullUrl = aSource.url;
|
||||
let url = fullUrl.split(" -> ").pop();
|
||||
let label = aSource.addonPath ? aSource.addonPath : SourceUtils.getSourceLabel(url);
|
||||
let group;
|
||||
|
||||
if (!aSource.url && aSource.introductionUrl) {
|
||||
label += ' > ' + aSource.introductionType;
|
||||
group = L10N.getStr("evalGroupLabel");
|
||||
}
|
||||
else if(aSource.addonID) {
|
||||
group = aSource.addonID;
|
||||
}
|
||||
else {
|
||||
group = SourceUtils.getSourceGroup(url);
|
||||
}
|
||||
let group = aSource.addonID ? aSource.addonID : SourceUtils.getSourceGroup(url);
|
||||
|
||||
return {
|
||||
label: label,
|
||||
|
@ -407,7 +407,7 @@ skip-if = e10s # Bug 1093535
|
||||
[browser_dbg_sources-cache.js]
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_sources-eval-01.js]
|
||||
skip-if = e10s && debug
|
||||
skip-if = true # non-named eval sources turned off for now, bug 1124106
|
||||
[browser_dbg_sources-eval-02.js]
|
||||
skip-if = e10s && debug
|
||||
[browser_dbg_sources-labels.js]
|
||||
|
@ -28,16 +28,16 @@ function test() {
|
||||
function run() {
|
||||
return Task.spawn(function*() {
|
||||
let newSource = waitForDebuggerEvents(gPanel, gDebugger.EVENTS.NEW_SOURCE);
|
||||
callInTab(gTab, "evalSource");
|
||||
callInTab(gTab, "evalSourceWithSourceURL");
|
||||
yield newSource;
|
||||
|
||||
yield gPanel.addBreakpoint({ actor: gSources.values[1], line: 2 });
|
||||
yield gPanel.addBreakpoint({ actor: gSources.values[0], line: 2 });
|
||||
yield ensureThreadClientState(gPanel, "resumed");
|
||||
|
||||
const paused = waitForThreadEvents(gPanel, "paused");
|
||||
callInTab(gTab, "bar");
|
||||
let frame = (yield paused).frame;
|
||||
is(frame.where.source.actor, gSources.values[1], "Should have broken on the eval'ed source");
|
||||
is(frame.where.source.actor, gSources.values[0], "Should have broken on the eval'ed source");
|
||||
is(frame.where.line, 2, "Should break on line 2");
|
||||
|
||||
yield resumeDebuggerThenCloseAndFinish(gPanel);
|
||||
|
Loading…
Reference in New Issue
Block a user