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

Unified Diff: runtime/bin/loader.cc

Issue 2810223003: Attempt 2 -- Fix updating packages map on reload and add a regression test (Closed)
Patch Set: Created 3 years, 8 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/isolate_data.h ('k') | runtime/bin/vmservice/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « runtime/bin/isolate_data.h ('k') | runtime/bin/vmservice/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698