Backed out changeset 258cff340229 (bug 1200798) for new intermittent test failures in browser_dbg_breakpoints-button-02.js
This commit is contained in:
@@ -8,8 +8,6 @@ loader.lazyRequireGetter(this, "Services");
|
||||
loader.lazyImporter(this, "gDevTools", "resource://devtools/client/framework/gDevTools.jsm");
|
||||
loader.lazyImporter(this, "Task", "resource://gre/modules/Task.jsm");
|
||||
|
||||
var DevToolsUtils = require("devtools/shared/DevToolsUtils");
|
||||
|
||||
/**
|
||||
* Tries to open a Stylesheet file in the Style Editor. If the file is not found,
|
||||
* it is opened in source view instead.
|
||||
@@ -57,7 +55,7 @@ exports.viewSourceInDebugger = Task.async(function *(toolbox, sourceURL, sourceL
|
||||
let { panelWin: dbg } = yield toolbox.loadTool("jsdebugger");
|
||||
|
||||
if (!debuggerAlreadyOpen) {
|
||||
yield dbg.DebuggerController.waitForSourcesLoaded();
|
||||
yield dbg.once(dbg.EVENTS.SOURCES_ADDED);
|
||||
}
|
||||
|
||||
let { DebuggerView } = dbg;
|
||||
@@ -66,11 +64,7 @@ exports.viewSourceInDebugger = Task.async(function *(toolbox, sourceURL, sourceL
|
||||
let item = Sources.getItemForAttachment(a => a.source.url === sourceURL);
|
||||
if (item) {
|
||||
yield toolbox.selectTool("jsdebugger");
|
||||
const isLoading = dbg.DebuggerController.getState().sources.selectedSource !== item.attachment.source.actor;
|
||||
DebuggerView.setEditorLocation(item.attachment.source.actor, sourceLine, { noDebug: true });
|
||||
if (isLoading) {
|
||||
yield dbg.DebuggerController.waitForSourceShown(sourceURL);
|
||||
}
|
||||
yield DebuggerView.setEditorLocation(item.attachment.source.actor, sourceLine, { noDebug: true });
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user