Bug 881102 - Propagate exceptions in object metadata callback, r=luke.

This commit is contained in:
Brian Hackett
2013-06-24 10:55:28 -06:00
parent c57965d706
commit 01a05c1b2d
7 changed files with 40 additions and 18 deletions

View File

@@ -378,8 +378,12 @@ NewPropertyIteratorObject(JSContext *cx, unsigned flags)
if (!type)
return NULL;
JSObject *metadata = NULL;
if (!NewObjectMetadata(cx, &metadata))
return NULL;
Class *clasp = &PropertyIteratorObject::class_;
RootedShape shape(cx, EmptyShape::getInitialShape(cx, clasp, NULL, NULL, NewObjectMetadata(cx),
RootedShape shape(cx, EmptyShape::getInitialShape(cx, clasp, NULL, NULL, metadata,
ITERATOR_FINALIZE_KIND));
if (!shape)
return NULL;