[flutter_tools] fix debug stack traces (#50872)
This commit is contained in:
parent
57acc68740
commit
67362ce5e0
@ -33,9 +33,9 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
|
||||
number: -1,
|
||||
packageScheme: 'package',
|
||||
package: 'web_integration',
|
||||
packagePath: 'stack_trace.dart.lib.js',
|
||||
line: 138,
|
||||
column: 15,
|
||||
packagePath: 'stack_trace.dart',
|
||||
line: 121,
|
||||
column: 3,
|
||||
className: '<unknown>',
|
||||
method: 'baz',
|
||||
source: '',
|
||||
@ -44,9 +44,9 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
|
||||
number: -1,
|
||||
packageScheme: 'package',
|
||||
package: 'web_integration',
|
||||
packagePath: 'stack_trace.dart.lib.js',
|
||||
line: 135,
|
||||
column: 17,
|
||||
packagePath: 'stack_trace.dart',
|
||||
line: 116,
|
||||
column: 3,
|
||||
className: '<unknown>',
|
||||
method: 'bar',
|
||||
source: '',
|
||||
@ -55,9 +55,9 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
|
||||
number: -1,
|
||||
packageScheme: 'package',
|
||||
package: 'web_integration',
|
||||
packagePath: 'stack_trace.dart.lib.js',
|
||||
line: 132,
|
||||
column: 17,
|
||||
packagePath: 'stack_trace.dart',
|
||||
line: 111,
|
||||
column: 3,
|
||||
className: '<unknown>',
|
||||
method: 'foo',
|
||||
source: '',
|
||||
|
@ -194,7 +194,17 @@ define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_
|
||||
function(url) {
|
||||
url = url.replace(baseUrl, '/');
|
||||
var module = window.\$dartLoader.urlToModuleId.get(url);
|
||||
if (!module) return null;
|
||||
if (!module) {
|
||||
if (url.endsWith('dart_sdk.js')) {
|
||||
module = 'dart_sdk';
|
||||
} else {
|
||||
try {
|
||||
module = '/packages' + url.split('packages')[1].split('.')[0] + '.dart';
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return dart.getSourceMap(module);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user