| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index e6a2c113fd4e22ca22b8cfcfe967a2443691a187..fa710116a83d91156fd281cb51c2ac6b7304e68e 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -14258,6 +14258,14 @@ void Code::InvalidateEmbeddedObjects() {
|
|
|
|
|
| void Code::Relocate(intptr_t delta) {
|
| + if (trap_handler::EnableTrapHandler() && is_wasm_code()) {
|
| + fprintf(stderr, "Relocating Wasm code from %p to %p\n",
|
| + instruction_start() - delta, instruction_start());
|
| + 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);
|
| }
|
|
|