Unverified Commit 550c82d5 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] initialize web stack trace formatter (#50680)

parent d3a41816
......@@ -185,9 +185,23 @@ for (let moduleName of Object.getOwnPropertyNames(modulePaths)) {
// Create the main module loaded below.
define("main_module.bootstrap", ["$entrypoint", "dart_sdk"], function(app, dart_sdk) {
dart_sdk.dart.setStartAsyncSynchronously(true);
dart_sdk._isolate_helper.startRootIsolate(() => {}, []);
dart_sdk._debugger.registerDevtoolsFormatter();
let voidToNull = () => (voidToNull = dart_sdk.dart.constFn(dart_sdk.dart.fnType(dart_sdk.core.Null, [dart_sdk.dart.void])))();
\$dartLoader.getModuleLibraries = dart_sdk.dart.getModuleLibraries;
if (window.\$dartStackTraceUtility && !window.\$dartStackTraceUtility.ready) {
window.\$dartStackTraceUtility.ready = true;
let dart = dart_sdk.dart;
window.\$dartStackTraceUtility.setSourceMapProvider(
function(url) {
url = url.replace(baseUrl, '/');
var module = window.\$dartLoader.urlToModuleId.get(url);
if (!module) return null;
return dart.getSourceMap(module);
});
}
if (typeof document != 'undefined') {
window.postMessage({ type: "DDC_STATE_CHANGE", state: "start" }, "*");
}
dart_sdk._isolate_helper.startRootIsolate(() => {}, []);
// See the generateMainModule doc comment.
var child = {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment