| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 7b8fa38fb7c2d27956506d697c5e4e0af5a4c709..f864817ea829fbc30500d4d5b15f3df379e447a1 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -1370,6 +1370,15 @@ Handle<JSObject> Factory::NewJSObjectFromMap(
|
|
|
|
|
| Handle<JSArray> Factory::NewJSArray(ElementsKind elements_kind,
|
| + PretenureFlag pretenure) {
|
| + CALL_HEAP_FUNCTION(isolate(),
|
| + isolate()->heap()->AllocateJSArray(elements_kind,
|
| + pretenure),
|
| + JSArray);
|
| +}
|
| +
|
| +
|
| +Handle<JSArray> Factory::NewJSArray(ElementsKind elements_kind,
|
| int length,
|
| int capacity,
|
| ArrayStorageAllocationMode mode,
|
| @@ -1389,14 +1398,8 @@ Handle<JSArray> Factory::NewJSArrayWithElements(Handle<FixedArrayBase> elements,
|
| ElementsKind elements_kind,
|
| int length,
|
| PretenureFlag pretenure) {
|
| - ASSERT(length <= elements->length());
|
| - CALL_HEAP_FUNCTION(
|
| - isolate(),
|
| - isolate()->heap()->AllocateJSArrayWithElements(*elements,
|
| - elements_kind,
|
| - length,
|
| - pretenure),
|
| - JSArray);
|
| + return isolate()->heap()->AllocateJSArrayWithElements(
|
| + elements, elements_kind, length, pretenure);
|
| }
|
|
|
|
|
|
|