Index: runtime/bin/loader.cc |
diff --git a/runtime/bin/loader.cc b/runtime/bin/loader.cc |
index f35c7076e9491a66bb876e74c5432cba8fc98117..de82be482639d729dd82c52a08cf82a723711f37 100644 |
--- a/runtime/bin/loader.cc |
+++ b/runtime/bin/loader.cc |
@@ -652,7 +652,15 @@ Dart_Handle Loader::LibraryTagHandler(Dart_LibraryTag tag, |
IsolateData* isolate_data = |
reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); |
ASSERT(isolate_data != NULL); |
- |
+ if ((tag == Dart_kScriptTag) && Dart_IsString(library)) { |
+ // Update packages file for isolate. |
+ const char* packages_file = NULL; |
+ Dart_Handle result = Dart_StringToCString(library, &packages_file); |
+ if (Dart_IsError(result)) { |
+ return result; |
+ } |
+ isolate_data->UpdatePackagesFile(packages_file); |
+ } |
// Grab this isolate's loader. |
Loader* loader = NULL; |