Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 6cb5e212026de06051e8d83d9000964d4e3a7ba5..e6179bf406e4c7ef33a5c9cb70397ac642223c05 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -10376,6 +10376,18 @@ void Code::InvalidateRelocation() { |
} |
+void Code::InvalidateEmbeddedObjects() { |
+ Object* undefined = GetHeap()->undefined_value(); |
+ int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
+ for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
+ RelocInfo::Mode mode = it.rinfo()->rmode(); |
+ if (mode == RelocInfo::EMBEDDED_OBJECT) { |
+ it.rinfo()->set_target_object(undefined, SKIP_WRITE_BARRIER); |
+ } |
+ } |
+} |
+ |
+ |
void Code::Relocate(intptr_t delta) { |
for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
it.rinfo()->apply(delta); |