OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library trydart.compilation; | 5 library trydart.compilation; |
6 | 6 |
7 import 'dart:html' show | 7 import 'dart:html' show |
8 Blob, | 8 Blob, |
9 Element, | 9 Element, |
10 ErrorEvent, | 10 ErrorEvent, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 default: | 132 default: |
133 throw ['Unknown message kind', message]; | 133 throw ['Unknown message kind', message]; |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 onDartHtml(_) { | 137 onDartHtml(_) { |
138 usesDartHtml = true; | 138 usesDartHtml = true; |
139 } | 139 } |
140 | 140 |
141 onFail(_) { | 141 onFail(_) { |
142 // TODO(ahe): Call interaction.onCompilationFailed(). | 142 interaction.onCompilationFailed(); |
ahe
2014/07/03 14:44:50
Bad merge.
| |
143 interaction.consolePrintLine('Compilation failed'); | |
144 } | 143 } |
145 | 144 |
146 onDone(_) { | 145 onDone(_) { |
147 interaction.onCompilationDone(); | 146 interaction.onCompilationDone(); |
148 isDone = true; | 147 isDone = true; |
149 receivePort.close(); | 148 receivePort.close(); |
150 } | 149 } |
151 | 150 |
152 // This is called in browsers that support creating Object URLs in a | 151 // This is called in browsers that support creating Object URLs in a |
153 // web worker. For example, Chrome and Firefox 21. | 152 // web worker. For example, Chrome and Firefox 21. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
249 int begin = diagnostic['begin']; | 248 int begin = diagnostic['begin']; |
250 int end = diagnostic['end']; | 249 int end = diagnostic['end']; |
251 if (begin == null) return; | 250 if (begin == null) return; |
252 if (seenMessages.add('$begin:$end: [$kind] $message')) { | 251 if (seenMessages.add('$begin:$end: [$kind] $message')) { |
253 // Guard against duplicated messages. | 252 // Guard against duplicated messages. |
254 addDiagnostic(kind, message, begin, end); | 253 addDiagnostic(kind, message, begin, end); |
255 } | 254 } |
256 } | 255 } |
257 | 256 |
258 onCrash(data) { | 257 onCrash(data) { |
259 interaction.consolePrintLine(data); | 258 interaction.onCompilerCrash(data); |
ahe
2014/07/03 14:44:50
Bad merge.
| |
260 } | 259 } |
261 } | 260 } |
OLD | NEW |