[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,
|
number: -1,
|
||||||
packageScheme: 'package',
|
packageScheme: 'package',
|
||||||
package: 'web_integration',
|
package: 'web_integration',
|
||||||
packagePath: 'stack_trace.dart.lib.js',
|
packagePath: 'stack_trace.dart',
|
||||||
line: 138,
|
line: 121,
|
||||||
column: 15,
|
column: 3,
|
||||||
className: '<unknown>',
|
className: '<unknown>',
|
||||||
method: 'baz',
|
method: 'baz',
|
||||||
source: '',
|
source: '',
|
||||||
@ -44,9 +44,9 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
|
|||||||
number: -1,
|
number: -1,
|
||||||
packageScheme: 'package',
|
packageScheme: 'package',
|
||||||
package: 'web_integration',
|
package: 'web_integration',
|
||||||
packagePath: 'stack_trace.dart.lib.js',
|
packagePath: 'stack_trace.dart',
|
||||||
line: 135,
|
line: 116,
|
||||||
column: 17,
|
column: 3,
|
||||||
className: '<unknown>',
|
className: '<unknown>',
|
||||||
method: 'bar',
|
method: 'bar',
|
||||||
source: '',
|
source: '',
|
||||||
@ -55,9 +55,9 @@ const List<StackFrame> expectedDebugStackFrames = <StackFrame>[
|
|||||||
number: -1,
|
number: -1,
|
||||||
packageScheme: 'package',
|
packageScheme: 'package',
|
||||||
package: 'web_integration',
|
package: 'web_integration',
|
||||||
packagePath: 'stack_trace.dart.lib.js',
|
packagePath: 'stack_trace.dart',
|
||||||
line: 132,
|
line: 111,
|
||||||
column: 17,
|
column: 3,
|
||||||
className: '<unknown>',
|
className: '<unknown>',
|
||||||
method: 'foo',
|
method: 'foo',
|
||||||
source: '',
|
source: '',
|
||||||
|
@ -194,7 +194,17 @@ define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_
|
|||||||
function(url) {
|
function(url) {
|
||||||
url = url.replace(baseUrl, '/');
|
url = url.replace(baseUrl, '/');
|
||||||
var module = window.\$dartLoader.urlToModuleId.get(url);
|
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);
|
return dart.getSourceMap(module);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user