Commit 79837f5f authored by binji's avatar binji Committed by Commit bot

Improve ValueSerializer perf regression after 96635558

BUG=687196
R=jbroman@chromium.org

Review-Url: https://codereview.chromium.org/2674613002
Cr-Commit-Position: refs/heads/master@{#42938}
parent 67fc083a
......@@ -233,7 +233,7 @@ void ValueSerializer::WriteRawBytes(const void* source, size_t length) {
Maybe<uint8_t*> ValueSerializer::ReserveRawBytes(size_t bytes) {
size_t old_size = buffer_size_;
size_t new_size = old_size + bytes;
if (new_size > buffer_capacity_) {
if (V8_UNLIKELY(new_size > buffer_capacity_)) {
bool ok;
if (!ExpandBuffer(new_size).To(&ok)) {
return Nothing<uint8_t*>();
......
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