Skip to content

Commit 95c4b0d

Browse files
mlippautzjasnell
authored andcommitted
deps: backport 78867ad8707a016 from v8 upstream
Original commit message: Remove object grouping Enbedders should switch to EmbedderHeapTracer API. BUG=v8:5828 Change-Id: I82f2bc583d246617865a17f5904e02cd35f92fec Reviewed-on: https://chromium-review.googlesource.com/448539 Reviewed-by: Hannes Payer <[email protected]> Reviewed-by: Ulan Degenbaev <[email protected]> Commit-Queue: Michael Lippautz <[email protected]> Cr-Commit-Position: refs/heads/master@{#43551} Ref: https://chromium-review.googlesource.com/448539 Ref: v8/v8@78867ad8707a016 PR-URL: #12875 Reviewed-By: James M Snell <[email protected]>
1 parent f06f836 commit 95c4b0d

16 files changed

+5
-1139
lines changed

deps/v8/include/v8-profiler.h

-5
Original file line numberDiff line numberDiff line change
@@ -812,11 +812,6 @@ class V8_EXPORT HeapProfiler {
812812
/** Returns memory used for profiler internal data and snapshots. */
813813
size_t GetProfilerMemorySize();
814814

815-
/**
816-
* Sets a RetainedObjectInfo for an object group (see V8::SetObjectGroupId).
817-
*/
818-
void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
819-
820815
private:
821816
HeapProfiler();
822817
~HeapProfiler();

deps/v8/include/v8.h

-69
Original file line numberDiff line numberDiff line change
@@ -6824,45 +6824,6 @@ class V8_EXPORT Isolate {
68246824
*/
68256825
Local<Value> ThrowException(Local<Value> exception);
68266826

6827-
/**
6828-
* Allows the host application to group objects together. If one
6829-
* object in the group is alive, all objects in the group are alive.
6830-
* After each garbage collection, object groups are removed. It is
6831-
* intended to be used in the before-garbage-collection callback
6832-
* function, for instance to simulate DOM tree connections among JS
6833-
* wrapper objects. Object groups for all dependent handles need to
6834-
* be provided for kGCTypeMarkSweepCompact collections, for all other
6835-
* garbage collection types it is sufficient to provide object groups
6836-
* for partially dependent handles only.
6837-
*/
6838-
template <typename T>
6839-
V8_DEPRECATED("Use EmbedderHeapTracer",
6840-
void SetObjectGroupId(const Persistent<T>& object,
6841-
UniqueId id));
6842-
6843-
/**
6844-
* Allows the host application to declare implicit references from an object
6845-
* group to an object. If the objects of the object group are alive, the child
6846-
* object is alive too. After each garbage collection, all implicit references
6847-
* are removed. It is intended to be used in the before-garbage-collection
6848-
* callback function.
6849-
*/
6850-
template <typename T>
6851-
V8_DEPRECATED("Use EmbedderHeapTracer",
6852-
void SetReferenceFromGroup(UniqueId id,
6853-
const Persistent<T>& child));
6854-
6855-
/**
6856-
* Allows the host application to declare implicit references from an object
6857-
* to another object. If the parent object is alive, the child object is alive
6858-
* too. After each garbage collection, all implicit references are removed. It
6859-
* is intended to be used in the before-garbage-collection callback function.
6860-
*/
6861-
template <typename T, typename S>
6862-
V8_DEPRECATED("Use EmbedderHeapTracer",
6863-
void SetReference(const Persistent<T>& parent,
6864-
const Persistent<S>& child));
6865-
68666827
typedef void (*GCCallback)(Isolate* isolate, GCType type,
68676828
GCCallbackFlags flags);
68686829

@@ -7328,9 +7289,6 @@ class V8_EXPORT Isolate {
73287289
template <class K, class V, class Traits>
73297290
friend class PersistentValueMapBase;
73307291

7331-
void SetObjectGroupId(internal::Object** object, UniqueId id);
7332-
void SetReferenceFromGroup(UniqueId id, internal::Object** object);
7333-
void SetReference(internal::Object** parent, internal::Object** child);
73347292
void ReportExternalAllocationLimitReached();
73357293
};
73367294

@@ -9745,33 +9703,6 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
97459703
return *external_memory;
97469704
}
97479705

9748-
9749-
template<typename T>
9750-
void Isolate::SetObjectGroupId(const Persistent<T>& object,
9751-
UniqueId id) {
9752-
TYPE_CHECK(Value, T);
9753-
SetObjectGroupId(reinterpret_cast<internal::Object**>(object.val_), id);
9754-
}
9755-
9756-
9757-
template<typename T>
9758-
void Isolate::SetReferenceFromGroup(UniqueId id,
9759-
const Persistent<T>& object) {
9760-
TYPE_CHECK(Value, T);
9761-
SetReferenceFromGroup(id, reinterpret_cast<internal::Object**>(object.val_));
9762-
}
9763-
9764-
9765-
template<typename T, typename S>
9766-
void Isolate::SetReference(const Persistent<T>& parent,
9767-
const Persistent<S>& child) {
9768-
TYPE_CHECK(Object, T);
9769-
TYPE_CHECK(Value, S);
9770-
SetReference(reinterpret_cast<internal::Object**>(parent.val_),
9771-
reinterpret_cast<internal::Object**>(child.val_));
9772-
}
9773-
9774-
97759706
Local<Value> Context::GetEmbedderData(int index) {
97769707
#ifndef V8_ENABLE_CHECKS
97779708
typedef internal::Object O;

deps/v8/src/api.cc

-32
Original file line numberDiff line numberDiff line change
@@ -8059,31 +8059,6 @@ v8::Local<Value> Isolate::ThrowException(v8::Local<v8::Value> value) {
80598059
return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
80608060
}
80618061

8062-
8063-
void Isolate::SetObjectGroupId(internal::Object** object, UniqueId id) {
8064-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8065-
internal_isolate->global_handles()->SetObjectGroupId(
8066-
i::Handle<i::Object>(object).location(), id);
8067-
}
8068-
8069-
8070-
void Isolate::SetReferenceFromGroup(UniqueId id, internal::Object** object) {
8071-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8072-
internal_isolate->global_handles()->SetReferenceFromGroup(
8073-
id, i::Handle<i::Object>(object).location());
8074-
}
8075-
8076-
8077-
void Isolate::SetReference(internal::Object** parent,
8078-
internal::Object** child) {
8079-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8080-
i::Object** parent_location = i::Handle<i::Object>(parent).location();
8081-
internal_isolate->global_handles()->SetReference(
8082-
reinterpret_cast<i::HeapObject**>(parent_location),
8083-
i::Handle<i::Object>(child).location());
8084-
}
8085-
8086-
80878062
void Isolate::AddGCPrologueCallback(GCCallback callback, GCType gc_type) {
80888063
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
80898064
isolate->heap()->AddGCPrologueCallback(callback, gc_type);
@@ -10028,13 +10003,6 @@ size_t HeapProfiler::GetProfilerMemorySize() {
1002810003
GetMemorySizeUsedByProfiler();
1002910004
}
1003010005

10031-
10032-
void HeapProfiler::SetRetainedObjectInfo(UniqueId id,
10033-
RetainedObjectInfo* info) {
10034-
reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info);
10035-
}
10036-
10037-
1003810006
v8::Testing::StressType internal::Testing::stress_type_ =
1003910007
v8::Testing::kStressTypeOpt;
1004010008

0 commit comments

Comments
 (0)