Bug 1578031 - Correct return type for `GetOffsetGuardLimit`. r=lth
☠☠ backed out by 81799bad5b25 ☠ ☠
authorRyan Hunt <rhunt@eqrion.net>
Mon, 02 Sep 2019 09:45:20 +0000
changeset 491138 5cc570283ec269c9415a87b8e2a2a1d070c88b0e
parent 491137 397bbb20d928970eb59c8d18cd2aa739b81cffee
child 491139 445b8539779a92b9942d0b2d4a8df98eeac82200
push id94235
push usersledru@mozilla.com
push dateMon, 02 Sep 2019 09:46:50 +0000
treeherderautoland@5cc570283ec2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslth
bugs1578031
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1578031 - Correct return type for `GetOffsetGuardLimit`. r=lth Differential Revision: https://phabricator.services.mozilla.com/D44311
js/src/wasm/WasmTypes.h
--- a/js/src/wasm/WasmTypes.h
+++ b/js/src/wasm/WasmTypes.h
@@ -2325,17 +2325,17 @@ static_assert(HugeOffsetGuardLimit < UIN
 static const size_t OffsetGuardLimit = PageSize - MaxMemoryAccessSize;
 static const size_t GuardSize = PageSize;
 
 static_assert(MaxMemoryAccessSize < GuardSize,
               "Guard page handles partial out-of-bounds");
 static_assert(OffsetGuardLimit < UINT32_MAX,
               "checking for overflow against OffsetGuardLimit is enough.");
 
-static constexpr bool GetOffsetGuardLimit(bool hugeMemory) {
+static constexpr size_t GetOffsetGuardLimit(bool hugeMemory) {
 #ifdef WASM_SUPPORTS_HUGE_MEMORY
   return hugeMemory ? HugeOffsetGuardLimit : OffsetGuardLimit;
 #else
   return OffsetGuardLimit;
 #endif
 }
 
 // Return whether the given immediate satisfies the constraints of the platform