Commit f9ecb8d2 authored by Christian Biesinger's avatar Christian Biesinger Committed by Dale Curtis

[layoutng] Fix CFI bot failures

Due to https://chromium-review.googlesource.com/c/chromium/src/+/1296491

See log: https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20CFI/10902

TBR=mstensho@chromium.org

Bug: 898540
Change-Id: I2e3e3ead85602b111ca423cb89b1a0ce2813f170
Reviewed-on: https://chromium-review.googlesource.com/c/1298015Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Reviewed-by: default avatarMorten Stenshorne <mstensho@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602443}
parent 5c137151
...@@ -44,14 +44,13 @@ class CORE_EXPORT NGBlockBreakToken final : public NGBreakToken { ...@@ -44,14 +44,13 @@ class CORE_EXPORT NGBlockBreakToken final : public NGBreakToken {
LayoutUnit used_block_size, LayoutUnit used_block_size,
const NGBreakTokenVector& child_break_tokens, const NGBreakTokenVector& child_break_tokens,
bool has_last_resort_break = false) { bool has_last_resort_break = false) {
NGBlockBreakToken* token = void* token = ::WTF::Partitions::FastMalloc(
static_cast<NGBlockBreakToken*>(::WTF::Partitions::FastMalloc( sizeof(NGBlockBreakToken) +
sizeof(NGBlockBreakToken) + child_break_tokens.size() * sizeof(NGBreakToken*),
child_break_tokens.size() * sizeof(NGBreakToken*), ::WTF::GetStringWithTypeName<NGBlockBreakToken>());
::WTF::GetStringWithTypeName<NGBlockBreakToken>()));
new (token) NGBlockBreakToken(node, used_block_size, child_break_tokens, new (token) NGBlockBreakToken(node, used_block_size, child_break_tokens,
has_last_resort_break); has_last_resort_break);
return base::AdoptRef(token); return base::AdoptRef(static_cast<NGBlockBreakToken*>(token));
} }
// Creates a break token for a node which cannot produce any more fragments. // Creates a break token for a node which cannot produce any more fragments.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment