Skip to content

Commit 7dba3a3

Browse files
committed
fix(benchmarks): fix infinite scroll benchmark.
1 parent 746f85a commit 7dba3a3

File tree

1 file changed

+24
-6
lines changed
  • modules/benchmarks/src/naive_infinite_scroll

1 file changed

+24
-6
lines changed

modules/benchmarks/src/naive_infinite_scroll/index.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler}
99
import {reflector} from 'angular2/src/reflection/reflection';
1010
import {CompilerCache} from 'angular2/src/core/compiler/compiler';
1111
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
12+
import {ShadowDomStrategy, NativeShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy';
1213
import {TemplateLoader} from 'angular2/src/core/compiler/template_loader';
1314
import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle';
15+
import {XHR} from 'angular2/src/core/compiler/xhr/xhr';
16+
import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl';
1417

1518
import {NgIf, NgRepeat} from 'angular2/directives';
1619
import {App, setupReflectorForApp} from './app';
@@ -169,9 +172,11 @@ export function setupReflectorForAngular() {
169172
});
170173

171174
reflector.registerType(Compiler, {
172-
'factory': (changeDetection, templateLoader, reader, parser, compilerCache) => new Compiler(changeDetection, templateLoader, reader, parser, compilerCache),
173-
'parameters': [[ChangeDetection], [TemplateLoader], [DirectiveMetadataReader], [Parser], [CompilerCache]],
174-
'annotations': []
175+
"factory": (changeDetection, templateLoader, reader, parser, compilerCache, shadowDomStrategy) =>
176+
new Compiler(changeDetection, templateLoader, reader, parser, compilerCache, shadowDomStrategy),
177+
"parameters": [[ChangeDetection], [TemplateLoader], [DirectiveMetadataReader], [Parser],
178+
[CompilerCache], [ShadowDomStrategy]],
179+
"annotations": []
175180
});
176181

177182
reflector.registerType(CompilerCache, {
@@ -187,9 +192,15 @@ export function setupReflectorForAngular() {
187192
});
188193

189194
reflector.registerType(TemplateLoader, {
190-
'factory': () => new TemplateLoader(),
191-
'parameters': [],
192-
'annotations': []
195+
"factory": (xhr) => new TemplateLoader(xhr),
196+
"parameters": [[XHR]],
197+
"annotations": []
198+
});
199+
200+
reflector.registerType(XHR, {
201+
"factory": () => new XHRImpl(),
202+
"parameters": [],
203+
"annotations": []
193204
});
194205

195206
reflector.registerType(DirectiveMetadataReader, {
@@ -209,4 +220,11 @@ export function setupReflectorForAngular() {
209220
"parameters": [[ChangeDetector]],
210221
"annotations": []
211222
});
223+
224+
reflector.registerType(ShadowDomStrategy, {
225+
"factory": () => new NativeShadowDomStrategy(),
226+
"parameters": [],
227+
"annotations": []
228+
});
229+
212230
}

0 commit comments

Comments
 (0)