This commit is contained in:
Robert Sayre 2010-07-08 18:18:36 -07:00
commit fced15d17b
3 changed files with 6 additions and 2 deletions

View File

@ -566,6 +566,7 @@ ObjectWrapperParent::CPOW_NewEnumerate(JSContext *cx, JSObject *obj,
switch (enum_op) {
case JSENUMERATE_INIT:
case JSENUMERATE_INIT_ALL:
self->Manager()->RequestRunToCompletion();
return self->NewEnumerateInit(cx, statep, idp);
case JSENUMERATE_NEXT:

View File

@ -3789,6 +3789,8 @@ JS_ClearScope(JSContext *cx, JSObject *obj)
for (key = JSProto_Null; key < JSProto_LIMIT * 3; key++)
JS_SetReservedSlot(cx, obj, key, JSVAL_VOID);
}
js_InitRandom(cx);
}
JS_PUBLIC_API(JSIdArray *)

View File

@ -1065,15 +1065,16 @@ proxy_create(JSContext *cx, uintN argc, jsval *vp)
JSObject *handler;
if (!(handler = NonNullObject(cx, vp[2])))
return false;
JSObject *proto, *parent;
JSObject *proto, *parent = NULL;
if (argc > 1 && !JSVAL_IS_PRIMITIVE(vp[3])) {
proto = JSVAL_TO_OBJECT(vp[3]);
parent = proto->getParent();
} else {
JS_ASSERT(VALUE_IS_FUNCTION(cx, vp[0]));
proto = NULL;
parent = JSVAL_TO_OBJECT(vp[0])->getParent();
}
if (!parent)
parent = JSVAL_TO_OBJECT(vp[0])->getParent();
JSObject *proxy = NewProxyObject(cx, &JSScriptedProxyHandler::singleton, OBJECT_TO_JSVAL(handler),
proto, parent);
if (!proxy)