Skip to content

Commit 78867ad

Browse files
mlippautzCommit Bot
authored andcommitted
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 <hpayer@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#43551}
1 parent 2e00025 commit 78867ad

16 files changed

Lines changed: 5 additions & 1140 deletions

‎include/v8-profiler.h‎

Lines changed: 0 additions & 5 deletions
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();

‎include/v8.h‎

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6826,45 +6826,6 @@ class V8_EXPORT Isolate {
68266826
*/
68276827
Local<Value> ThrowException(Local<Value> exception);
68286828

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

@@ -7330,9 +7291,6 @@ class V8_EXPORT Isolate {
73307291
template <class K, class V, class Traits>
73317292
friend class PersistentValueMapBase;
73327293

7333-
void SetObjectGroupId(internal::Object** object, UniqueId id);
7334-
void SetReferenceFromGroup(UniqueId id, internal::Object** object);
7335-
void SetReference(internal::Object** parent, internal::Object** child);
73367294
void ReportExternalAllocationLimitReached();
73377295
};
73387296

@@ -9742,33 +9700,6 @@ int64_t Isolate::AdjustAmountOfExternalAllocatedMemory(
97429700
return *external_memory;
97439701
}
97449702

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

‎src/api.cc‎

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8055,31 +8055,6 @@ v8::Local<Value> Isolate::ThrowException(v8::Local<v8::Value> value) {
80558055
return v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate));
80568056
}
80578057

8058-
8059-
void Isolate::SetObjectGroupId(internal::Object** object, UniqueId id) {
8060-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8061-
internal_isolate->global_handles()->SetObjectGroupId(
8062-
i::Handle<i::Object>(object).location(), id);
8063-
}
8064-
8065-
8066-
void Isolate::SetReferenceFromGroup(UniqueId id, internal::Object** object) {
8067-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8068-
internal_isolate->global_handles()->SetReferenceFromGroup(
8069-
id, i::Handle<i::Object>(object).location());
8070-
}
8071-
8072-
8073-
void Isolate::SetReference(internal::Object** parent,
8074-
internal::Object** child) {
8075-
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this);
8076-
i::Object** parent_location = i::Handle<i::Object>(parent).location();
8077-
internal_isolate->global_handles()->SetReference(
8078-
reinterpret_cast<i::HeapObject**>(parent_location),
8079-
i::Handle<i::Object>(child).location());
8080-
}
8081-
8082-
80838058
void Isolate::AddGCPrologueCallback(GCCallback callback, GCType gc_type) {
80848059
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this);
80858060
isolate->heap()->AddGCPrologueCallback(callback, gc_type);
@@ -10032,13 +10007,6 @@ size_t HeapProfiler::GetProfilerMemorySize() {
1003210007
GetMemorySizeUsedByProfiler();
1003310008
}
1003410009

10035-
10036-
void HeapProfiler::SetRetainedObjectInfo(UniqueId id,
10037-
RetainedObjectInfo* info) {
10038-
reinterpret_cast<i::HeapProfiler*>(this)->SetRetainedObjectInfo(id, info);
10039-
}
10040-
10041-
1004210010
v8::Testing::StressType internal::Testing::stress_type_ =
1004310011
v8::Testing::kStressTypeOpt;
1004410012

0 commit comments

Comments
 (0)