mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-01 20:13:00 +00:00
Bug 867784 - Allocate RegExpObjects initially tenured; r=sstangl,terrence
This commit is contained in:
parent
b9c577b09f
commit
5fd5aae938
@ -35,7 +35,9 @@ RegExpObjectBuilder::getOrCreate()
|
||||
if (reobj_)
|
||||
return true;
|
||||
|
||||
JSObject *obj = NewBuiltinClassInstance(cx, &RegExpClass);
|
||||
// Note: RegExp objects are always allocated in the tenured heap. This is
|
||||
// not strictly required, but simplifies embedding them in jitcode.
|
||||
JSObject *obj = NewBuiltinClassInstance(cx, &RegExpClass, TenuredObject);
|
||||
if (!obj)
|
||||
return false;
|
||||
obj->initPrivate(NULL);
|
||||
@ -49,7 +51,10 @@ RegExpObjectBuilder::getOrCreateClone(RegExpObject *proto)
|
||||
{
|
||||
JS_ASSERT(!reobj_);
|
||||
|
||||
JSObject *clone = NewObjectWithGivenProto(cx, &RegExpClass, proto, proto->getParent());
|
||||
// Note: RegExp objects are always allocated in the tenured heap. This is
|
||||
// not strictly required, but simplifies embedding them in jitcode.
|
||||
JSObject *clone = NewObjectWithGivenProto(cx, &RegExpClass, proto, proto->getParent(),
|
||||
TenuredObject);
|
||||
if (!clone)
|
||||
return false;
|
||||
clone->initPrivate(NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user