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

Unified Diff: lib/initialize.dart

Issue 1008533003: add from option to run (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: code review updates, remove dartium support Created 5 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
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/mirror_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/initialize.dart
diff --git a/lib/initialize.dart b/lib/initialize.dart
index c5d07dd92d778945d129550b0c452e61b6cb226e..0df98d9909e4f7b51aaad15d550ef87d63cdcbda 100644
--- a/lib/initialize.dart
+++ b/lib/initialize.dart
@@ -12,12 +12,20 @@ part 'src/init_method.dart';
part 'src/initializer.dart';
/// Top level function which crawls the dependency graph and runs initializers.
-/// If `typeFilter` and/or `customFilter` are supplied then only those types of
+/// If [typeFilter] and/or [customFilter] are supplied then only those types of
/// annotations will be parsed. If both filters are supplied they are treated
/// as an AND.
-Future run({List<Type> typeFilter, InitializerFilter customFilter}) {
+///
+/// If [from] is supplied then initializers will be found starting from the
+/// library at the supplied uri.
+///
+/// **Warning**: Do not use [from] directly in your code unless you are building
+/// a framework that will use a transformer to remove this argument later. This
+/// parameter is supported in Dartium, but [run] will throw if you use the
+/// argument after building an application with `pub build` or `pub serve`.
+Future run({List<Type> typeFilter, InitializerFilter customFilter, Uri from}) {
return _runInitQueue(loader.loadInitializers(
- typeFilter: typeFilter, customFilter: customFilter));
+ typeFilter: typeFilter, customFilter: customFilter, from: from));
}
Future _runInitQueue(Queue<Function> initializers) {
« no previous file with comments | « CHANGELOG.md ('k') | lib/src/mirror_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698