mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 613452 - "Assertion failure: obj->isExtensible()" with Object.seal, sharps. r=Waldo.
This commit is contained in:
parent
c216b7caf6
commit
06d366fad2
@ -130,7 +130,6 @@ PropertyCache::testForInit(JSRuntime *rt, jsbytecode *pc, JSObject *obj,
|
||||
const js::Shape **shapep, PropertyCacheEntry **entryp)
|
||||
{
|
||||
JS_ASSERT(obj->slotSpan() >= JSSLOT_FREE(obj->getClass()));
|
||||
JS_ASSERT(obj->isExtensible());
|
||||
uint32 kshape = obj->shape();
|
||||
PropertyCacheEntry *entry = &table[hash(pc, kshape)];
|
||||
*entryp = entry;
|
||||
@ -142,6 +141,10 @@ PropertyCache::testForInit(JSRuntime *rt, jsbytecode *pc, JSObject *obj,
|
||||
if (entry->kpc == pc &&
|
||||
entry->kshape == kshape &&
|
||||
entry->vshape() == rt->protoHazardShape) {
|
||||
// If obj is not extensible, we cannot have a cache hit. This happens
|
||||
// for sharp-variable expressions like (#1={x: Object.seal(#1#)}).
|
||||
JS_ASSERT(obj->isExtensible());
|
||||
|
||||
PCMETER(pchits++);
|
||||
PCMETER(inipchits++);
|
||||
JS_ASSERT(entry->vcapTag() == 0);
|
||||
|
@ -34,6 +34,7 @@ script findReferences-01.js
|
||||
script findReferences-02.js
|
||||
script findReferences-03.js
|
||||
script findReferences-04.js
|
||||
script regress-613452.js
|
||||
script regress-627859.js
|
||||
script regress-627984-1.js
|
||||
script regress-627984-2.js
|
||||
|
13
js/src/tests/js1_8_5/extensions/regress-613452.js
Normal file
13
js/src/tests/js1_8_5/extensions/regress-613452.js
Normal file
@ -0,0 +1,13 @@
|
||||
// Any copyright is dedicated to the Public Domain.
|
||||
// http://creativecommons.org/licenses/publicdomain/
|
||||
|
||||
for (var i = 0; i < 2; i++) {
|
||||
try {
|
||||
(#1={x: Object.seal(#1#)}); // do not assert
|
||||
} catch (exc) {}
|
||||
}
|
||||
|
||||
for (var i = 0; i < 2; i++)
|
||||
(#1={x: (#1#.x = 1, Object.seal(#1#))}); // do not assert
|
||||
|
||||
reportCompare(0, 0, 'ok');
|
Loading…
Reference in New Issue
Block a user