summaryrefslogtreecommitdiff
path: root/js/src/jsobjinlines.h
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jsobjinlines.h')
-rw-r--r--js/src/jsobjinlines.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/src/jsobjinlines.h b/js/src/jsobjinlines.h
index 9039fc7eb6..a27a13fd6c 100644
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -319,7 +319,7 @@ SetNewObjectMetadata(ExclusiveContext* cxArg, JSObject* obj)
} // namespace js
-/* static */ inline JSObject*
+/* static */ inline JS::Result<JSObject*, JS::OOM&>
JSObject::create(js::ExclusiveContext* cx, js::gc::AllocKind kind, js::gc::InitialHeap heap,
js::HandleShape shape, js::HandleObjectGroup group)
{
@@ -375,7 +375,7 @@ JSObject::create(js::ExclusiveContext* cx, js::gc::AllocKind kind, js::gc::Initi
JSObject* obj = js::Allocate<JSObject>(cx, kind, nDynamicSlots, heap, clasp);
if (!obj)
- return nullptr;
+ return cx->alreadyReportedOOM();
obj->group_.init(group);