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

Side by Side Diff: pkg/dev_compiler/lib/js/legacy/dart_library.js

Issue 2742653002: Fix custom formatter setup (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /* This file defines the module loader for the dart runtime. 5 /* This file defines the module loader for the dart runtime.
6 */ 6 */
7 var dart_library; 7 var dart_library;
8 if (!dart_library) { 8 if (!dart_library) {
9 dart_library = 9 dart_library =
10 typeof module != "undefined" && module.exports || {}; 10 typeof module != "undefined" && module.exports || {};
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 dart_library.import = import_; 163 dart_library.import = import_;
164 164
165 var _currentIsolate = false; 165 var _currentIsolate = false;
166 166
167 function start(moduleName, libraryName) { 167 function start(moduleName, libraryName) {
168 if (libraryName == null) libraryName = moduleName; 168 if (libraryName == null) libraryName = moduleName;
169 let library = import_(moduleName)[libraryName]; 169 let library = import_(moduleName)[libraryName];
170 let dart_sdk = import_('dart_sdk'); 170 let dart_sdk = import_('dart_sdk');
171 171
172 // This import is only needed for chrome debugging. We should provide an
173 // option to compile without it.
Jacob 2017/03/09 02:59:07 you should make sure registerDevtoolsFormatter isn
174 dart_sdk._debugger.registerDevtoolsFormatter();
175
172 if (!_currentIsolate) { 176 if (!_currentIsolate) {
173 // Create isolate. 177 // Create isolate.
174 _currentIsolate = true; 178 _currentIsolate = true;
175 dart_sdk._isolate_helper.startRootIsolate(() => {}, []); 179 dart_sdk._isolate_helper.startRootIsolate(() => {}, []);
176 } 180 }
177 181
178 library.main(); 182 library.main();
179 } 183 }
180 dart_library.start = start; 184 dart_library.start = start;
181 185
182 let _bootstrapped = false; 186 let _bootstrapped = false;
Jacob 2017/03/09 02:59:07 with this tweak the bootstrap method is now a no o
183 function bootstrap() { 187 function bootstrap() {
184 if (_bootstrapped) return; 188 if (_bootstrapped) return;
185 _bootstrapped = true; 189 _bootstrapped = true;
186
187 // This import is only needed for chrome debugging. We should provide an
188 // option to compile without it.
189 dart_sdk._debugger.registerDevtoolsFormatter();
vsm 2017/03/09 02:54:07 dart_sdk isn't defined here - breaking internal te
190 } 190 }
191 191
192 })(dart_library); 192 })(dart_library);
193 } 193 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698