Commit b3bd7289 authored by binji's avatar binji Committed by Commit bot

Fix cluster-fuzz regression with Workers when serializing empty string

BUG=chromium:503991
R=jochen@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1210623002

Cr-Commit-Position: refs/heads/master@{#29263}
parent edcc242a
......@@ -1538,8 +1538,10 @@ void SerializationData::WriteTag(SerializationTag tag) { data.Add(tag); }
void SerializationData::WriteMemory(const void* p, int length) {
i::Vector<uint8_t> block = data.AddBlock(0, length);
memcpy(&block[0], p, length);
if (length > 0) {
i::Vector<uint8_t> block = data.AddBlock(0, length);
memcpy(&block[0], p, length);
}
}
......
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
if (this.Worker) {
__v_3 = "";
function __f_1() {}
var __v_6 = new Worker(__f_1);
__v_6.postMessage(__v_3);
}
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