-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry-pick 2ac0620a5bbb from v8 (#36295)
* chore: [19-x-y] cherry-pick 2ac0620a5bbb from v8 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
- Loading branch information
1 parent
bd5166a
commit 4450b7b
Showing
2 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Thibaud Michaud <thibaudm@chromium.org> | ||
Date: Wed, 26 Oct 2022 17:03:36 +0200 | ||
Subject: Merged: [wasm] Reload cached instance fields in catch handler | ||
|
||
Bug: chromium:1377816 | ||
(cherry picked from commit f517e518af26b7eac23c9e328b463eb1e8ee3499) | ||
|
||
Change-Id: I993bcff0389a1ba134e89e8ac5299d742ddd150c | ||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3999134 | ||
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org> | ||
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> | ||
Cr-Commit-Position: refs/branch-heads/10.6@{#47} | ||
Cr-Branched-From: 41bc7435693fbce8ef86753cd9239e30550a3e2d-refs/heads/10.6.194@{#1} | ||
Cr-Branched-From: d5f29b929ce7746409201d77f44048f3e9529b40-refs/heads/main@{#82548} | ||
|
||
diff --git a/src/wasm/graph-builder-interface.cc b/src/wasm/graph-builder-interface.cc | ||
index f2d776435dd8cff94eea9533a06f6023813a233b..24452564d8159fbaed1acec98c30832b1383c1d8 100644 | ||
--- a/src/wasm/graph-builder-interface.cc | ||
+++ b/src/wasm/graph-builder-interface.cc | ||
@@ -87,6 +87,7 @@ class WasmGraphBuildingInterface { | ||
struct TryInfo : public ZoneObject { | ||
SsaEnv* catch_env; | ||
TFNode* exception = nullptr; | ||
+ bool first_catch = true; | ||
|
||
bool might_throw() const { return exception != nullptr; } | ||
|
||
@@ -879,6 +880,10 @@ class WasmGraphBuildingInterface { | ||
|
||
TFNode* exception = block->try_info->exception; | ||
SetEnv(block->try_info->catch_env); | ||
+ if (block->try_info->first_catch) { | ||
+ LoadContextIntoSsa(ssa_env_); | ||
+ block->try_info->first_catch = false; | ||
+ } | ||
|
||
TFNode* if_catch = nullptr; | ||
TFNode* if_no_catch = nullptr; | ||
@@ -956,6 +961,9 @@ class WasmGraphBuildingInterface { | ||
} | ||
|
||
SetEnv(block->try_info->catch_env); | ||
+ if (block->try_info->first_catch) { | ||
+ LoadContextIntoSsa(ssa_env_); | ||
+ } | ||
} | ||
|
||
void AtomicOp(FullDecoder* decoder, WasmOpcode opcode, |