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

Side by Side Diff: bin/dwc_browser.dart

Issue 11450020: (Fix #215) better error printing in editor & extension, adds mapping for editor (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years 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 | extension/background.js » ('j') | extension/content_script.js » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Compiles Dart Web Components from within a Chrome extension. 6 * Compiles Dart Web Components from within a Chrome extension.
7 * The Chrome extension logic exists outside of Dart as Dart does not support 7 * The Chrome extension logic exists outside of Dart as Dart does not support
8 * Chrome extension APIs at this time. 8 * Chrome extension APIs at this time.
9 */ 9 */
10 library dwc_browser; 10 library dwc_browser;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // TODO(jacobr): provide a way to pass in options. 43 // TODO(jacobr): provide a way to pass in options.
44 var options = CompilerOptions.parse(['--no-colors', uri.path]); 44 var options = CompilerOptions.parse(['--no-colors', uri.path]);
45 messages = new Messages(options: options); 45 messages = new Messages(options: options);
46 asyncTime('Compiled $sourceUri', () { 46 asyncTime('Compiled $sourceUri', () {
47 var compiler = new Compiler(fileSystem, options); 47 var compiler = new Compiler(fileSystem, options);
48 return compiler.run().chain((_) { 48 return compiler.run().chain((_) {
49 for (var file in compiler.output) { 49 for (var file in compiler.output) {
50 fileSystem.writeString(file.path, file.contents); 50 fileSystem.writeString(file.path, file.contents);
51 } 51 }
52 var ret = fileSystem.flush(); 52 var ret = fileSystem.flush();
53 js.scoped(() {
54 js.context.proxyMessages(sourcePagePort,
Jennifer Messerly 2012/12/06 04:00:08 out of curiousity, can you inline proxyMessages?
Siggi Cherem (dart-lang) 2012/12/06 18:46:42 yes, I believe so, I wasn't sure if 'map' worked o
55 js.array(messages.messages.map((m) => m.toString())));
56 });
53 js.release(sourcePagePort); 57 js.release(sourcePagePort);
54 return ret; 58 return ret;
55 }); 59 });
56 }, printTime: true); 60 }, printTime: true);
57 } 61 }
OLDNEW
« no previous file with comments | « no previous file | extension/background.js » ('j') | extension/content_script.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698