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

Unified Diff: runtime/vm/object_reload.cc

Issue 2144113002: Disallow deferred loading when using isolate reloading. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review Created 4 years, 5 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/vm/isolate_reload.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_reload.cc
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index 3e52226005cff8cd1f52e387866b48e4ac56ec96..2f8d5b3fb4fb27807178c7916968f82369564bb0 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -527,6 +527,22 @@ bool Class::CanReload(const Class& replacement) const {
bool Library::CanReload(const Library& replacement) const {
+ // TODO(26878): If the replacement library uses deferred loading,
+ // reject it. We do not yet support reloading deferred libraries.
+ LibraryPrefix& prefix = LibraryPrefix::Handle();
+ LibraryPrefixIterator it(replacement);
+ while (it.HasNext()) {
+ prefix = it.GetNext();
+ if (prefix.is_deferred_load()) {
+ const String& lib_url = String::Handle(replacement.url());
+ const String& prefix_name = String::Handle(prefix.name());
+ IRC->ReportError(String::Handle(String::NewFormatted(
+ "Reloading support for deferred loading has not yet been implemented:"
+ " library '%s' has deferred import '%s'",
+ lib_url.ToCString(), prefix_name.ToCString())));
+ return false;
+ }
+ }
return true;
}
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698