[dart:io] Don't apply the namespace to the kernel service isolate
Change-Id: If29cb9c0202c8121f6076025fb3870d4f5721948
Reviewed-on: https://dart-review.googlesource.com/59903
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 0348dbd..01e11b7 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -367,8 +367,10 @@
CHECK_RESULT(result);
}
+ const char* namespc =
+ Dart_IsKernelIsolate(isolate) ? NULL : Options::namespc();
if (isolate_run_app_snapshot) {
- result = DartUtils::SetupIOLibrary(Options::namespc(), script_uri,
+ result = DartUtils::SetupIOLibrary(namespc, script_uri,
Options::exit_disabled());
CHECK_RESULT(result);
if (FLAG_support_service || !kDartPrecompiledRuntime) {
@@ -411,7 +413,7 @@
Dart_GetMainPortId(), Dart_Timeline_Event_Async_End, 0,
NULL, NULL);
- result = DartUtils::SetupIOLibrary(Options::namespc(), script_uri,
+ result = DartUtils::SetupIOLibrary(namespc, script_uri,
Options::exit_disabled());
CHECK_RESULT(result);
#else