mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 07:15:46 +00:00
Bug 599672 - Give the regexp statics a parent. r=cdleary
This commit is contained in:
parent
7e549c90ad
commit
0080dbcfa1
@ -3000,7 +3000,7 @@ JS_NewGlobalObject(JSContext *cx, JSClass *clasp)
|
||||
return NULL;
|
||||
|
||||
/* Construct a regexp statics object for this global object. */
|
||||
JSObject *res = regexp_statics_construct(cx);
|
||||
JSObject *res = regexp_statics_construct(cx, obj);
|
||||
if (!res ||
|
||||
!js_SetReservedSlot(cx, obj, JSRESERVED_GLOBAL_REGEXP_STATICS,
|
||||
ObjectValue(*res))) {
|
||||
|
@ -60,9 +60,9 @@ namespace js {
|
||||
extern Class regexp_statics_class;
|
||||
|
||||
static inline JSObject *
|
||||
regexp_statics_construct(JSContext *cx)
|
||||
regexp_statics_construct(JSContext *cx, JSObject *parent)
|
||||
{
|
||||
JSObject *obj = NewObject<WithProto::Given>(cx, ®exp_statics_class, NULL, NULL);
|
||||
JSObject *obj = NewObject<WithProto::Given>(cx, ®exp_statics_class, NULL, parent);
|
||||
if (!obj)
|
||||
return NULL;
|
||||
RegExpStatics *res = cx->create<RegExpStatics>();
|
||||
|
Loading…
Reference in New Issue
Block a user