| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index db2045f8da97ce9727381743ff5133743d490f43..4e58cec02601d60c97ccbe46dc76415975e86bef 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -6452,6 +6452,18 @@ void Isolate::ClearInterrupt() {
|
| }
|
|
|
|
|
| +void Isolate::RequestGarbageCollection(GarbageCollectionType type) {
|
| + if (type == kMinorGarbageCollection) {
|
| + reinterpret_cast<i::Isolate*>(this)->heap()->CollectGarbage(
|
| + i::NEW_SPACE, "Isolate::RequestGarbageCollection");
|
| + } else {
|
| + ASSERT_EQ(kFullGarbageCollection, type);
|
| + reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
|
| + i::Heap::kNoGCFlags, "Isolate::RequestGarbageCollection");
|
| + }
|
| +}
|
| +
|
| +
|
| Isolate* Isolate::GetCurrent() {
|
| i::Isolate* isolate = i::Isolate::UncheckedCurrent();
|
| return reinterpret_cast<Isolate*>(isolate);
|
|
|