Bug 905700 - use Debugger.Source in the debugger backend and reference source actors instead of URLs in the frontend r=fitzgen

This commit is contained in:
James Long
2014-11-25 15:02:39 -08:00
parent 782943792e
commit edda82574b
164 changed files with 2840 additions and 1974 deletions

View File

@@ -1253,8 +1253,9 @@ function getThumbnailForCall(thumbnails, index) {
*/
function viewSourceInDebugger(url, line) {
let showSource = ({ DebuggerView }) => {
if (DebuggerView.Sources.containsValue(url)) {
DebuggerView.setEditorLocation(url, line, { noDebug: true }).then(() => {
let item = DebuggerView.Sources.getItemForAttachment(a => a.source.url === url);
if (item) {
DebuggerView.setEditorLocation(item.attachment.source.actor, line, { noDebug: true }).then(() => {
window.emit(EVENTS.SOURCE_SHOWN_IN_JS_DEBUGGER);
}, () => {
window.emit(EVENTS.SOURCE_NOT_FOUND_IN_JS_DEBUGGER);