Commit c970c1cb authored by jochen@chromium.org's avatar jochen@chromium.org

Update Isolate::RequestGarbageCollection after r18691

BUG=none
R=hpayer@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/143403002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 62ef558d
...@@ -6444,8 +6444,8 @@ void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) { ...@@ -6444,8 +6444,8 @@ void Isolate::RequestGarbageCollectionForTesting(GarbageCollectionType type) {
} else { } else {
ASSERT_EQ(kFullGarbageCollection, type); ASSERT_EQ(kFullGarbageCollection, type);
reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage( reinterpret_cast<i::Isolate*>(this)->heap()->CollectAllGarbage(
i::Heap::kNoGCFlags, "Isolate::RequestGarbageCollection", i::Heap::kAbortIncrementalMarkingMask,
kGCCallbackFlagForced); "Isolate::RequestGarbageCollection", kGCCallbackFlagForced);
} }
} }
......
...@@ -40,14 +40,9 @@ v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunctionTemplate( ...@@ -40,14 +40,9 @@ v8::Handle<v8::FunctionTemplate> GCExtension::GetNativeFunctionTemplate(
void GCExtension::GC(const v8::FunctionCallbackInfo<v8::Value>& args) { void GCExtension::GC(const v8::FunctionCallbackInfo<v8::Value>& args) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(args.GetIsolate()); args.GetIsolate()->RequestGarbageCollectionForTesting(
if (args[0]->BooleanValue()) { args[0]->BooleanValue() ? v8::Isolate::kMinorGarbageCollection
isolate->heap()->CollectGarbage( : v8::Isolate::kFullGarbageCollection);
NEW_SPACE, "gc extension", v8::kGCCallbackFlagForced);
} else {
isolate->heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask,
"gc extension", v8::kGCCallbackFlagForced);
}
} }
} } // namespace v8::internal } } // namespace v8::internal
...@@ -7121,6 +7121,7 @@ void WhammyPropertyGetter(Local<String> name, ...@@ -7121,6 +7121,7 @@ void WhammyPropertyGetter(Local<String> name,
THREADED_TEST(WeakReference) { THREADED_TEST(WeakReference) {
i::FLAG_expose_gc = true;
v8::Isolate* isolate = CcTest::isolate(); v8::Isolate* isolate = CcTest::isolate();
v8::HandleScope handle_scope(isolate); v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> templ= v8::ObjectTemplate::New(isolate); v8::Handle<v8::ObjectTemplate> templ= v8::ObjectTemplate::New(isolate);
...@@ -13479,6 +13480,7 @@ static void CheckSurvivingGlobalObjectsCount(int expected) { ...@@ -13479,6 +13480,7 @@ static void CheckSurvivingGlobalObjectsCount(int expected) {
TEST(DontLeakGlobalObjects) { TEST(DontLeakGlobalObjects) {
// Regression test for issues 1139850 and 1174891. // Regression test for issues 1139850 and 1174891.
i::FLAG_expose_gc = true;
v8::V8::Initialize(); v8::V8::Initialize();
for (int i = 0; i < 5; i++) { for (int i = 0; i < 5; i++) {
......
...@@ -232,6 +232,7 @@ TEST(UncaughtThrow) { ...@@ -232,6 +232,7 @@ TEST(UncaughtThrow) {
// | JS | // | JS |
// | C-to-JS | // | C-to-JS |
TEST(C2JSFrames) { TEST(C2JSFrames) {
FLAG_expose_gc = true;
v8::HandleScope scope(CcTest::isolate()); v8::HandleScope scope(CcTest::isolate());
v8::Local<v8::Context> context = v8::Local<v8::Context> context =
CcTest::NewContext(PRINT_EXTENSION | GC_EXTENSION); CcTest::NewContext(PRINT_EXTENSION | GC_EXTENSION);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment