Skip to content

Commit b287b9e

Browse files
ofrobotsMylesBorins
authored andcommitted
deps: V8: cherry-pick e8e9c07 from upstream
Original commit message: Make sure the heap is in consistent state when calling allocation observers. The observer might want to lookup something in the heap, e.g. code objects it has in the call stack. BUG=v8:4959 LOG=N Review-Url: https://codereview.chromium.org/1948893002 Cr-Commit-Position: refs/heads/master@{#36027} Ref: https://bugs.chromium.org/p/v8/issues/detail?id=4959 Ref: v8/v8@e8e9c07
1 parent 9804e7f commit b287b9e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 281
14-
#define V8_PATCH_LEVEL 110
14+
#define V8_PATCH_LEVEL 111
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/heap/spaces.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2382,7 +2382,6 @@ HeapObject* FreeList::Allocate(int size_in_bytes) {
23822382
int new_node_size = 0;
23832383
FreeSpace* new_node = FindNodeFor(size_in_bytes, &new_node_size);
23842384
if (new_node == nullptr) return nullptr;
2385-
owner_->AllocationStep(new_node->address(), size_in_bytes);
23862385

23872386
int bytes_left = new_node_size - size_in_bytes;
23882387
DCHECK(bytes_left >= 0);
@@ -2428,6 +2427,8 @@ HeapObject* FreeList::Allocate(int size_in_bytes) {
24282427
new_node->address() + new_node_size);
24292428
}
24302429

2430+
owner_->AllocationStep(new_node->address(), size_in_bytes);
2431+
24312432
return new_node;
24322433
}
24332434

0 commit comments

Comments
 (0)