Skip to content

Commit 054bea0

Browse files
paolosevMSFTV8 LUCI CQ
authored andcommitted
[wasm] Fix build after WasmDispatchTable refactoring
Fix DrumBrake build break caused by changes in https://crrev.com/c/7105440 (Reland "[sandbox][wasm] Un-expose dispatch_table_for_imports") Change-Id: I480843c9e1d98df96bdb489f76219680525d9304 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7110678 Reviewed-by: Daniel Lehmann <[email protected]> Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Paolo Severini <[email protected]> Commit-Queue: Jakob Kummerow <[email protected]> Cr-Commit-Position: refs/heads/main@{#103468}
1 parent 1a1ff55 commit 054bea0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/wasm/wasm-objects.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2497,7 +2497,8 @@ void SetForNonWrapper(Tagged<DispatchTable> dispatch_table, int index,
24972497
} else {
24982498
#if V8_ENABLE_DRUMBRAKE
24992499
// Ignore call_target, not used in jitless mode.
2500-
WriteField<int>(offset + kFunctionIndexBias, function_index);
2500+
dispatch_table->template WriteField<int>(
2501+
offset + DispatchTable::kFunctionIndexBias, function_index);
25012502
#endif // V8_ENABLE_DRUMBRAKE
25022503
}
25032504
dispatch_table->WriteProtectedPointerField(
@@ -2578,7 +2579,8 @@ void SetForWrapper(
25782579
} else {
25792580
#if V8_ENABLE_DRUMBRAKE
25802581
// Ignore call_target, not used in jitless mode.
2581-
WriteField<int>(offset + kFunctionIndexBias, function_index);
2582+
dispatch_table->template WriteField<int>(
2583+
offset + DispatchTable::kFunctionIndexBias, function_index);
25822584
#endif // V8_ENABLE_DRUMBRAKE
25832585
}
25842586
if constexpr (requires { DispatchTable::kSigBias; }) {

src/wasm/wasm-objects.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,10 +961,9 @@ class WasmDispatchTableForImports : public TrustedObject {
961961
// In jitless mode, reuse the 'target' field storage to hold the (uint32_t)
962962
// function index.
963963
static constexpr size_t kFunctionIndexBias = kTargetBias;
964-
#else
964+
#endif // V8_ENABLE_DRUMBRAKE
965965
static constexpr size_t kEntryPaddingSize =
966966
TAGGED_SIZE_8_BYTES ? kUInt32Size : 0;
967-
#endif // V8_ENABLE_DRUMBRAKE
968967
static_assert(sizeof(WasmCodePointer) == kUInt32Size);
969968
static constexpr size_t kImplicitArgBias =
970969
kTargetBias + kEntryPaddingSize + kUInt32Size;

0 commit comments

Comments
 (0)