Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(663)

Unified Diff: pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
index 2efc6e44988f1625e08812f9e87b12bef2893b8e..b38e403012cc96dc6ec7e3e6ddd0321bd1655290 100644
--- a/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/main_call_stub_generator.dart
@@ -15,8 +15,8 @@ class MainCallStubGenerator {
/// Returns the code equivalent to:
/// `function(args) { $.startRootIsolate(X.main$closure(), args); }`
- jsAst.Expression _buildIsolateSetupClosure(Element appMain,
- Element isolateMain) {
+ jsAst.Expression _buildIsolateSetupClosure(
+ Element appMain, Element isolateMain) {
jsAst.Expression mainAccess =
emitterTask.isolateStaticClosureAccess(appMain);
// Since we pass the closurized version of the main method to
@@ -30,12 +30,11 @@ class MainCallStubGenerator {
jsAst.Expression mainCallClosure = null;
if (compiler.hasIsolateSupport) {
Element isolateMain =
- helpers.isolateHelperLibrary.find(BackendHelpers.START_ROOT_ISOLATE);
+ helpers.isolateHelperLibrary.find(BackendHelpers.START_ROOT_ISOLATE);
mainCallClosure = _buildIsolateSetupClosure(main, isolateMain);
} else if (compiler.options.hasIncrementalSupport) {
mainCallClosure = js(
- 'function() { return #(); }',
- emitterTask.staticFunctionAccess(main));
+ 'function() { return #(); }', emitterTask.staticFunctionAccess(main));
} else {
mainCallClosure = emitterTask.staticFunctionAccess(main);
}
@@ -47,7 +46,8 @@ class MainCallStubGenerator {
// onload event of all script tags and getting the first script which
// finishes. Since onload is called immediately after execution this should
// not substantially change execution order.
- return js.statement('''
+ return js.statement(
+ '''
(function (callback) {
if (typeof document === "undefined") {
callback(null);
@@ -79,7 +79,9 @@ class MainCallStubGenerator {
#mainCallClosure([]);
}
})''',
- {'currentScript': currentScriptAccess,
- 'mainCallClosure': mainCallClosure});
+ {
+ 'currentScript': currentScriptAccess,
+ 'mainCallClosure': mainCallClosure
+ });
}
}

Powered by Google App Engine
This is Rietveld 408576698