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

Unified Diff: modules/angular2/src/transform/transformer.dart

Issue 927373004: Initial commit of Dart transformer to generate constructor stubs, see https://github.com/angular/an… (Closed) Base URL: https://github.com/kegluneq/angular.git@master
Patch Set: Fixing review comments Created 5 years, 10 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
« no previous file with comments | « modules/angular2/src/transform/resolvers.dart ('k') | modules/angular2/src/transform/traversal.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/angular2/src/transform/transformer.dart
diff --git a/modules/angular2/src/transform/transformer.dart b/modules/angular2/src/transform/transformer.dart
index 9199b08f81c811982a3fd079412d417b56ff061f..10a1d49b6ef0ea7583ad45ce7c5d2d787b0dddc8 100644
--- a/modules/angular2/src/transform/transformer.dart
+++ b/modules/angular2/src/transform/transformer.dart
@@ -1,7 +1,4 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library angular2.transformer;
+library angular2.src.transform;
import 'dart:async';
import 'package:barback/barback.dart';
@@ -60,9 +57,12 @@ class AngularTransformer extends Transformer {
.error('New entry point file $newEntryPointId already exists.');
} else {
return _resolvers.get(transform).then((resolver) {
- new _BootstrapFileBuilder(resolver, transform,
- transform.primaryInput.id, newEntryPointId).run();
- resolver.release();
+ try {
+ new _BootstrapFileBuilder(resolver, transform,
+ transform.primaryInput.id, newEntryPointId).run();
+ } finally {
+ resolver.release();
+ }
});
}
});
@@ -93,7 +93,7 @@ class _BootstrapFileBuilder {
new ImportTraversal(_directiveInfo).traverse(entryLib);
var context = new codegen.Context(logger: _transform.logger);
- _directiveInfo.initQueue
+ _directiveInfo.matchQueue
.forEach((entry) => context.directiveRegistry.register(entry));
_transform.addOutput(new Asset.fromString(_newEntryPoint, codegen
« no previous file with comments | « modules/angular2/src/transform/resolvers.dart ('k') | modules/angular2/src/transform/traversal.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698