Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 6ead2db85dda2647bb02856f9a4f40f86127c56a..6a5d87487c000900648371904626d1ccaa225eee 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -13744,6 +13744,12 @@ void Code::InvalidateEmbeddedObjects() { |
void Code::Relocate(intptr_t delta) { |
+ if (trap_handler::UseTrapHandler() && is_wasm_code()) { |
+ const int index = trap_handler_index()->value(); |
+ if (index >= 0) { |
+ trap_handler::UpdateHandlerDataCodePointer(index, instruction_start()); |
+ } |
+ } |
for (RelocIterator it(this, RelocInfo::kApplyMask); !it.done(); it.next()) { |
it.rinfo()->apply(delta); |
} |