Commit 4d6c3097 authored by binji's avatar binji Committed by Commit bot

Fix cluster-fuzz bug introduced in refs/heads/master@{#28796}.

Don't DCHECK when neutering that the buffer is not a SharedArrayBuffer;
instead, just return early.

BUG=chromium:498142,chromium:497295
R=jarin@chromium.org
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#28892}
parent f83444a5
......@@ -144,7 +144,7 @@ RUNTIME_FUNCTION(Runtime_ArrayBufferNeuter) {
return isolate->heap()->undefined_value();
}
// Shared array buffers should never be neutered.
DCHECK(!array_buffer->is_shared());
RUNTIME_ASSERT(!array_buffer->is_shared());
DCHECK(!array_buffer->is_external());
void* backing_store = array_buffer->backing_store();
size_t byte_length = NumberToSize(isolate, array_buffer->byte_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.
// Flags: --allow-natives-syntax --harmony-sharedarraybuffer
var sab = new SharedArrayBuffer(16);
assertThrows(function() { %ArrayBufferNeuter(sab); });
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