@@ -296,44 +296,38 @@ class ElementBinder {
296296 var nodeAttrs = node is dom.Element ? new NodeAttrs (node) : null ;
297297 ElementProbe probe;
298298
299- var timerId;
300- assert ((timerId = _perf.startTimer ('ng.view.link.setUp' , _html (node))) != false );
301299 var directiveRefs = _usableDirectiveRefs;
302- try {
303- if (! hasDirectivesOrEvents) return parentInjector;
304-
305- var nodesAttrsDirectives = [];
306- var nodeModule = new Module ()
307- ..bind (NgElement )
308- ..bind (View , toValue: view)
309- ..bind (dom.Element , toValue: node)
310- ..bind (dom.Node , toValue: node)
311- ..bind (NodeAttrs , toValue: nodeAttrs)
312- ..bind (ElementProbe , toFactory: (_) => probe);
313-
314- directiveRefs.forEach ((DirectiveRef ref) {
315- Directive annotation = ref.annotation;
316- var visibility = ref.annotation.visibility;
317- if (ref.annotation is Controller ) {
318- scope = scope.createChild (new PrototypeMap (scope.context));
319- nodeModule.bind (Scope , toValue: scope);
320- }
300+ if (! hasDirectivesOrEvents) return parentInjector;
301+
302+ var nodesAttrsDirectives = [];
303+ var nodeModule = new Module ()
304+ ..bind (NgElement )
305+ ..bind (View , toValue: view)
306+ ..bind (dom.Element , toValue: node)
307+ ..bind (dom.Node , toValue: node)
308+ ..bind (NodeAttrs , toValue: nodeAttrs)
309+ ..bind (ElementProbe , toFactory: (_) => probe);
310+
311+ directiveRefs.forEach ((DirectiveRef ref) {
312+ Directive annotation = ref.annotation;
313+ var visibility = ref.annotation.visibility;
314+ if (ref.annotation is Controller ) {
315+ scope = scope.createChild (new PrototypeMap (scope.context));
316+ nodeModule.bind (Scope , toValue: scope);
317+ }
321318
322- _createDirectiveFactories (ref, nodeModule, node, nodesAttrsDirectives, nodeAttrs,
323- visibility);
324- if (ref.annotation.module != null ) {
325- nodeModule.install (ref.annotation.module ());
326- }
327- });
319+ _createDirectiveFactories (ref, nodeModule, node, nodesAttrsDirectives, nodeAttrs,
320+ visibility);
321+ if (ref.annotation.module != null ) {
322+ nodeModule.install (ref.annotation.module ());
323+ }
324+ });
328325
329- _registerViewFactory (node, parentInjector, nodeModule);
326+ _registerViewFactory (node, parentInjector, nodeModule);
330327
331- nodeInjector = parentInjector.createChild ([nodeModule]);
332- probe = _expando[node] = new ElementProbe (
333- parentInjector.get (ElementProbe ), node, nodeInjector, scope);
334- } finally {
335- assert (_perf.stopTimer (timerId) != false );
336- }
328+ nodeInjector = parentInjector.createChild ([nodeModule]);
329+ probe = _expando[node] = new ElementProbe (
330+ parentInjector.get (ElementProbe ), node, nodeInjector, scope);
337331
338332 _link (nodeInjector, probe, scope, nodeAttrs, formatters);
339333
0 commit comments