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

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: Create specialized root zones. 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
« no previous file with comments | « no previous file | runtime/lib/collection_dev_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
+ 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,
vsm 2013/10/14 14:49:30 Florian: I assume this is the only thing we'd need
floitsch 2013/10/14 15:17:31 correct.
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698