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

Unified Diff: sdk/lib/_internal/compiler/implementation/patch_parser.dart

Issue 206193002: Remove cancel and make crash exit with code 253. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/patch_parser.dart
diff --git a/sdk/lib/_internal/compiler/implementation/patch_parser.dart b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
index ea8ba1e26b8c8c827287cc5d0edaab526cd94191..46e3bb0a81af445fd659d2f15b17c03ece3c9a0f 100644
--- a/sdk/lib/_internal/compiler/implementation/patch_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
@@ -133,8 +133,9 @@ class PatchParserTask extends leg.CompilerTask {
* patches.
*/
Future patchLibrary(leg.LibraryDependencyHandler handler,
- Uri patchUri, LibraryElement originLibrary) {
- return compiler.readScript(patchUri, null).then((leg.Script script) {
+ Uri patchUri, LibraryElement originLibrary) {
+ return compiler.readScript(originLibrary, patchUri)
+ .then((leg.Script script) {
var patchLibrary = new LibraryElementX(script, null, originLibrary);
return compiler.withCurrentElement(patchLibrary, () {
handler.registerNewLibrary(patchLibrary);
@@ -440,8 +441,8 @@ void patchClass(leg.DiagnosticListener listener,
ClassElement origin,
ClassElement patch) {
if (origin.isPatched) {
- listener.internalErrorOnElement(
- origin, "Patching the same class more than once.");
+ listener.internalError(origin,
+ "Patching the same class more than once.");
}
// TODO(johnniwinther): Change to functions on the ElementX class.
origin.patch = patch;
@@ -536,11 +537,11 @@ void patchFunction(leg.DiagnosticListener listener,
return;
}
if (origin.isPatched) {
- listener.internalErrorOnElement(origin,
+ listener.internalError(origin,
"Trying to patch a function more than once.");
}
if (origin.cachedNode != null) {
- listener.internalErrorOnElement(origin,
+ listener.internalError(origin,
"Trying to patch an already compiled function.");
}
// Don't just assign the patch field. This also updates the cachedNode.

Powered by Google App Engine
This is Rietveld 408576698