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

Unified Diff: runtime/bin/dartutils.cc

Issue 1138083003: - Add --trace-loading to trace resolution and loading. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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 | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
===================================================================
--- runtime/bin/dartutils.cc (revision 45703)
+++ runtime/bin/dartutils.cc (working copy)
@@ -624,6 +624,7 @@
void DartUtils::PrepareBuiltinLibrary(Dart_Handle builtin_lib,
Dart_Handle internal_lib,
bool is_service_isolate,
+ bool trace_loading,
const char* package_root) {
// Setup the internal library's 'internalPrint' function.
Dart_Handle print = Dart_Invoke(
@@ -634,10 +635,15 @@
DART_CHECK_VALID(result);
if (!is_service_isolate) {
- result =
- Dart_SetField(builtin_lib, NewString("_isWindows"),
- IsWindowsHost() ? Dart_True() : Dart_False());
- DART_CHECK_VALID(result);
+ if (IsWindowsHost()) {
+ result = Dart_SetField(builtin_lib, NewString("_isWindows"), Dart_True());
+ DART_CHECK_VALID(result);
+ }
+ if (trace_loading) {
+ result = Dart_SetField(builtin_lib,
+ NewString("_traceLoading"), Dart_True());
+ DART_CHECK_VALID(result);
+ }
}
if (!is_service_isolate) {
@@ -702,6 +708,7 @@
Dart_Handle DartUtils::PrepareForScriptLoading(const char* package_root,
bool is_service_isolate,
+ bool trace_loading,
Dart_Handle builtin_lib) {
// First ensure all required libraries are available.
Dart_Handle url = NewString(kCoreLibURL);
@@ -731,6 +738,7 @@
PrepareBuiltinLibrary(builtin_lib,
internal_lib,
is_service_isolate,
+ trace_loading,
package_root);
PrepareAsyncLibrary(async_lib, isolate_lib);
PrepareCoreLibrary(core_lib, builtin_lib, is_service_isolate);
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698