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