Skip to content
forked from v8/v8

Commit

Permalink
Merged: [wasm] Reload cached instance fields in catch handler
Browse files Browse the repository at this point in the history
R=​jkummerow@chromium.org

Bug: chromium:1377816
(cherry picked from commit f517e51)

Change-Id: I5f073c88feb3736acfd04af4896908f5b49678a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3999133
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/branch-heads/10.7@{v8#36}
Cr-Branched-From: 4d2145c-refs/heads/10.7.193@{#1}
Cr-Branched-From: 9521696-refs/heads/main@{#83201}
  • Loading branch information
thibaudmichaud authored and V8 LUCI CQ committed Nov 2, 2022
1 parent 5a8a4a6 commit 77fa9d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/wasm/graph-builder-interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class WasmGraphBuildingInterface {
struct TryInfo : public ZoneObject {
SsaEnv* catch_env;
TFNode* exception = nullptr;
bool first_catch = true;

bool might_throw() const { return exception != nullptr; }

Expand Down Expand Up @@ -936,6 +937,10 @@ class WasmGraphBuildingInterface {

TFNode* exception = block->try_info->exception;
SetEnv(block->try_info->catch_env);
if (block->try_info->first_catch) {
LoadContextIntoSsa(ssa_env_, decoder);
block->try_info->first_catch = false;
}

TFNode* if_catch = nullptr;
TFNode* if_no_catch = nullptr;
Expand Down Expand Up @@ -1013,6 +1018,9 @@ class WasmGraphBuildingInterface {
}

SetEnv(block->try_info->catch_env);
if (block->try_info->first_catch) {
LoadContextIntoSsa(ssa_env_, decoder);
}
}

void AtomicOp(FullDecoder* decoder, WasmOpcode opcode,
Expand Down

0 comments on commit 77fa9d8

Please sign in to comment.