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

Unified Diff: bin/dartutils.cc

Issue 10911135: Simplify the builtin functions and get rid of unused code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 3 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 | « bin/builtin_nolib.cc ('k') | bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/dartutils.cc
===================================================================
--- bin/dartutils.cc (revision 11998)
+++ bin/dartutils.cc (working copy)
@@ -412,9 +412,19 @@
Dart_Handle result = Dart_SetField(print_impl,
Dart_NewString("_printClosure"), print);
- // Setup the IO library.
+ // Setup the 'timer' factory.
+ Dart_Handle url = Dart_NewString(kIsolateLibURL);
+ DART_CHECK_VALID(url);
+ Dart_Handle isolate_lib = Dart_LookupLibrary(url);
+ DART_CHECK_VALID(isolate_lib);
Dart_Handle io_lib = Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary);
- Builtin::SetupIOLibrary(io_lib);
+ Dart_Handle timer_closure =
+ Dart_Invoke(io_lib, Dart_NewString("_getTimerFactoryClosure"), 0, NULL);
+ Dart_Handle args[1];
+ args[0] = timer_closure;
+ DART_CHECK_VALID(Dart_Invoke(isolate_lib,
+ Dart_NewString("_setTimerFactoryClosure"),
+ 1, args));
// Set up package root if specified.
if (package_root != NULL) {
« no previous file with comments | « bin/builtin_nolib.cc ('k') | bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698