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

Unified Diff: runtime/vm/isolate.cc

Issue 2186423002: Only reload libraries when they may have been modified. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fixed bug with prefixed imports 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 697aef86d87c8180253e0a3e2dff0e2ce41d9520..0c003fad07ade73a62c1eaa0795faf59e3ab84b7 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -846,7 +846,8 @@ Isolate::Isolate(const Dart_IsolateFlags& api_flags)
has_attempted_reload_(false),
no_reload_scope_depth_(0),
reload_every_n_stack_overflow_checks_(FLAG_reload_every),
- reload_context_(NULL) {
+ reload_context_(NULL),
+ reload_timestamp_(OS::GetCurrentTimeMillis()) {
NOT_IN_PRODUCT(FlagsCopyFrom(api_flags));
// TODO(asiva): A Thread is not available here, need to figure out
// how the vm_tag (kEmbedderTagId) can be set, these tags need to
@@ -1089,12 +1090,13 @@ void Isolate::ReportReloadError(const Error& error) {
}
-void Isolate::ReloadSources(bool dont_delete_reload_context) {
+void Isolate::ReloadSources(bool force_reload,
+ bool dont_delete_reload_context) {
// TODO(asiva): Add verification of canonical objects.
ASSERT(!IsReloading());
has_attempted_reload_ = true;
reload_context_ = new IsolateReloadContext(this);
- reload_context_->StartReload();
+ reload_context_->StartReload(force_reload);
// TODO(asiva): Add verification of canonical objects.
if (dont_delete_reload_context) {
// Unit tests use the reload context later. Caller is responsible
@@ -1121,6 +1123,7 @@ void Isolate::DoneFinalizing() {
sticky_reload_error_ = reload_context_->error();
} else {
reload_context_->ReportSuccess();
+ reload_timestamp_ = reload_context_->reload_timestamp();
}
}
)

Powered by Google App Engine
This is Rietveld 408576698