Commit 9896fab0 authored by dcarney's avatar dcarney Committed by Commit bot

fix transition of typedarrays in ics

R=verwaest@chromium.org

BUG=

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

Cr-Commit-Position: refs/heads/master@{#26518}
parent 7280426a
......@@ -1508,6 +1508,7 @@ bool StoreIC::LookupForWrite(LookupIterator* it, Handle<Object> value,
}
}
if (it->IsSpecialNumericIndex()) return false;
it->PrepareTransitionToDataProperty(value, NONE, store_mode);
return it->IsCacheableTransition();
}
......
......@@ -120,7 +120,7 @@ void LookupIterator::PrepareTransitionToDataProperty(
if (state_ == TRANSITION) return;
DCHECK(state_ != LookupIterator::ACCESSOR);
DCHECK(state_ == NOT_FOUND || !HolderIsReceiverOrHiddenPrototype());
DCHECK(!IsSpecialNumericIndex());
// Can only be called when the receiver is a JSObject. JSProxy has to be
// handled via a trap. Adding properties to primitive values is not
// observable.
......
// 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.
var a = new Int32Array(10);
function f(a) { a["-1"] = 15; }
for (var i = 0; i < 3; i++) {
f(a);
}
assertEquals(undefined, a[-1]);
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