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

Unified Diff: src/objects.cc

Issue 2371833007: [wasm] Initial signal handler (Closed)
Patch Set: Split signal handler into a separate file Created 4 years 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index fb860a8f5bed924036568ef78e9b084235577e49..0f9c739b8e0501d37e78af33953c54c0b313f090 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);
}

Powered by Google App Engine
This is Rietveld 408576698