Bug 839215 - Make large typedarrays singletons more aggressively; r=bhackett

--HG--
extra : rebase_source : df0ea62ae25f7c106de01e38fb8ac729b0148f63
This commit is contained in:
Terrence Cole 2013-02-12 11:50:49 -08:00
parent da3ea8fd94
commit e49b79325e
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,2 @@
var b = new ArrayBuffer(10000000000);
var dv = new DataView(b);

View File

@ -216,8 +216,8 @@ DataViewNewObjectKind(JSContext *cx, uint32_t byteLength, JSObject *proto)
jsbytecode *pc;
JSScript *script = cx->stack.currentScript(&pc);
if (!proto && byteLength >= TypedArray::SINGLETON_TYPE_BYTE_LENGTH)
return types::UseNewTypeForInitializer(cx, script, pc, &DataViewClass);
return GenericObject;
return SingletonObject;
return types::UseNewTypeForInitializer(cx, script, pc, &DataViewClass);
}
inline DataViewObject *