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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1373333004: Also reset the stub of native calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 893c0de9439f97ad0ad4370b8840a3977aadf429..aa2d0d057d3d6a58e45821be4eea506f5b11b342 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1376,7 +1376,14 @@ void RawObjectPool::WriteTo(SnapshotWriter* writer,
Entry& entry = ptr()->data()[i];
switch (entry_type) {
case ObjectPool::kTaggedObject: {
- writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+ if (entry.raw_obj_ == StubCode::CallNativeCFunction_entry()->code()) {
+ // Natives can run while precompiling, becoming linked and switching
+ // their stub. Reset to the initial stub used for lazy-linking.
+ writer->WriteObjectImpl(
+ StubCode::CallBootstrapCFunction_entry()->code(), kAsReference);
+ } else {
+ writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+ }
break;
}
case ObjectPool::kImmediate: {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698