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

Unified Diff: runtime/bin/dartutils.cc

Issue 27112002: Make print interceptable. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 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
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 0cc4351b0371a89c0de04aa343291e8f750f3181..41a06e6348d9651078520fac4c42fefb5b0530d4 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -660,13 +660,13 @@ Dart_Handle DartUtils::LoadSource(CommandLineOptions* url_mapping,
Dart_Handle DartUtils::PrepareForScriptLoading(const char* package_root,
Dart_Handle builtin_lib) {
- Dart_Handle corelib = Dart_LookupLibrary(NewString("dart:core"));
- DART_CHECK_VALID(corelib);
-
- // Setup the corelib 'print' function.
+ // Setup the internal library's 'internalPrint' function.
+ Dart_Handle internal_lib =
+ Dart_LookupLibrary(NewString("dart:_collection-dev"));
Ivan Posva 2013/10/16 07:19:51 In my opinion this has nothing to do with any coll
floitsch 2013/10/16 07:38:56 Yes. we want to rename it, but since it's not user
+ DART_CHECK_VALID(internal_lib);
Dart_Handle print = Dart_Invoke(
builtin_lib, NewString("_getPrintClosure"), 0, NULL);
- Dart_Handle result = Dart_SetField(corelib,
+ Dart_Handle result = Dart_SetField(internal_lib,
NewString("_printClosure"),
print);
DART_CHECK_VALID(result);
@@ -685,6 +685,8 @@ Dart_Handle DartUtils::PrepareForScriptLoading(const char* package_root,
async_lib, NewString("_setTimerFactoryClosure"), 1, args));
// Setup the corelib 'Uri.base' getter.
+ Dart_Handle corelib = Dart_LookupLibrary(NewString("dart:core"));
+ DART_CHECK_VALID(corelib);
Dart_Handle uri_base = Dart_Invoke(
builtin_lib, NewString("_getUriBaseClosure"), 0, NULL);
DART_CHECK_VALID(uri_base);
« no previous file with comments | « no previous file | runtime/lib/collection_dev_sources.gypi » ('j') | sdk/lib/_internal/lib/collection_dev_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698