| Index: src/heap.h
|
| diff --git a/src/heap.h b/src/heap.h
|
| index da78b18a512764dae3510e6fcc6dfaa66665e129..ba3882c98c7dc0def37648c78335061a6294076a 100644
|
| --- a/src/heap.h
|
| +++ b/src/heap.h
|
| @@ -259,6 +259,12 @@ class Isolate;
|
| class WeakObjectRetainer;
|
|
|
|
|
| +enum AllocationOriginTrackMode {
|
| + DONT_TRACK_ALLOCATION_ORIGIN,
|
| + TRACK_ALLOCATION_ORIGIN
|
| +};
|
| +
|
| +
|
| typedef String* (*ExternalStringTableUpdaterCallback)(Heap* heap,
|
| Object** pointer);
|
|
|
| @@ -564,8 +570,9 @@ class Heap {
|
| MUST_USE_RESULT MaybeObject* AllocateEmptyJSArray(
|
| ElementsKind elements_kind,
|
| PretenureFlag pretenure = NOT_TENURED) {
|
| - return AllocateJSArrayAndStorage(elements_kind, 0, 0,
|
| - DONT_INITIALIZE_ARRAY_ELEMENTS,
|
| + return AllocateJSArrayAndStorage(elements_kind, 0,
|
| + JSArray::kPreallocatedArrayElements,
|
| + INITIALIZE_ARRAY_ELEMENTS_WITH_HOLE,
|
| pretenure);
|
| }
|
|
|
| @@ -593,7 +600,9 @@ class Heap {
|
| // Returns a deep copy of the JavaScript object.
|
| // Properties and elements are copied too.
|
| // Returns failure if allocation failed.
|
| - MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source);
|
| + MUST_USE_RESULT MaybeObject* CopyJSObject(
|
| + JSObject* source,
|
| + AllocationOriginTrackMode mode = DONT_TRACK_ALLOCATION_ORIGIN);
|
|
|
| // Allocates the function prototype.
|
| // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation
|
|
|