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

Unified Diff: initialize/lib/initialize.dart

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 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 | « initialize/lib/build/loader_replacer.dart ('k') | initialize/lib/src/init_method.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: initialize/lib/initialize.dart
diff --git a/initialize/lib/initialize.dart b/initialize/lib/initialize.dart
deleted file mode 100644
index 0df98d9909e4f7b51aaad15d550ef87d63cdcbda..0000000000000000000000000000000000000000
--- a/initialize/lib/initialize.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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 initialize;
-
-// The `loader_replacer` transformer will replace this with a static_loader.
-import 'src/mirror_loader.dart' as loader;
-import 'dart:async';
-import 'dart:collection';
-
-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
-/// annotations will be parsed. If both filters are supplied they are treated
-/// as an AND.
-///
-/// 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, from: from));
-}
-
-Future _runInitQueue(Queue<Function> initializers) {
- if (initializers.isEmpty) return new Future.value(null);
-
- var initializer = initializers.removeFirst();
- var val = initializer();
- if (val is! Future) val = new Future.value(val);
-
- return val.then((_) => _runInitQueue(initializers));
-}
« no previous file with comments | « initialize/lib/build/loader_replacer.dart ('k') | initialize/lib/src/init_method.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698