| 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.
|
|
|