Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Side by Side Diff: test/cctest/test-serialize.cc

Issue 1088083002: Revert of Force full GCwhenever CollectAllGarbage is meant to trigger a full GC. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/test-object-observe.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 v8::HandleScope handle_scope(v8_isolate); 290 v8::HandleScope handle_scope(v8_isolate);
291 v8::Local<v8::Context>::New(v8_isolate, env)->Enter(); 291 v8::Local<v8::Context>::New(v8_isolate, env)->Enter();
292 } 292 }
293 // Make sure all builtin scripts are cached. 293 // Make sure all builtin scripts are cached.
294 { 294 {
295 HandleScope scope(isolate); 295 HandleScope scope(isolate);
296 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { 296 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
297 isolate->bootstrapper()->NativesSourceLookup(i); 297 isolate->bootstrapper()->NativesSourceLookup(i);
298 } 298 }
299 } 299 }
300 heap->CollectAllGarbage(); 300 heap->CollectAllGarbage(Heap::kNoGCFlags);
301 heap->CollectAllGarbage(); 301 heap->CollectAllGarbage(Heap::kNoGCFlags);
302 302
303 Object* raw_foo; 303 Object* raw_foo;
304 { 304 {
305 v8::HandleScope handle_scope(v8_isolate); 305 v8::HandleScope handle_scope(v8_isolate);
306 v8::Local<v8::String> foo = v8::String::NewFromUtf8(v8_isolate, "foo"); 306 v8::Local<v8::String> foo = v8::String::NewFromUtf8(v8_isolate, "foo");
307 DCHECK(!foo.IsEmpty()); 307 DCHECK(!foo.IsEmpty());
308 raw_foo = *(v8::Utils::OpenHandle(*foo)); 308 raw_foo = *(v8::Utils::OpenHandle(*foo));
309 } 309 }
310 310
311 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; 311 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 // Make sure all builtin scripts are cached. 416 // Make sure all builtin scripts are cached.
417 { 417 {
418 HandleScope scope(isolate); 418 HandleScope scope(isolate);
419 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) { 419 for (int i = 0; i < Natives::GetBuiltinsCount(); i++) {
420 isolate->bootstrapper()->NativesSourceLookup(i); 420 isolate->bootstrapper()->NativesSourceLookup(i);
421 } 421 }
422 } 422 }
423 // If we don't do this then we end up with a stray root pointing at the 423 // If we don't do this then we end up with a stray root pointing at the
424 // context even after we have disposed of env. 424 // context even after we have disposed of env.
425 heap->CollectAllGarbage(); 425 heap->CollectAllGarbage(Heap::kNoGCFlags);
426 426
427 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10; 427 int file_name_length = StrLength(FLAG_testing_serialization_file) + 10;
428 Vector<char> startup_name = Vector<char>::New(file_name_length + 1); 428 Vector<char> startup_name = Vector<char>::New(file_name_length + 1);
429 SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file); 429 SNPrintF(startup_name, "%s.startup", FLAG_testing_serialization_file);
430 430
431 { 431 {
432 v8::HandleScope handle_scope(v8_isolate); 432 v8::HandleScope handle_scope(v8_isolate);
433 v8::Local<v8::Context>::New(v8_isolate, env)->Exit(); 433 v8::Local<v8::Context>::New(v8_isolate, env)->Exit();
434 } 434 }
435 435
(...skipping 1114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 isolate->Dispose(); 1550 isolate->Dispose();
1551 } 1551 }
1552 1552
1553 1553
1554 TEST(SerializationMemoryStats) { 1554 TEST(SerializationMemoryStats) {
1555 FLAG_profile_deserialization = true; 1555 FLAG_profile_deserialization = true;
1556 FLAG_always_opt = false; 1556 FLAG_always_opt = false;
1557 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); 1557 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob();
1558 delete[] blob.data; 1558 delete[] blob.data;
1559 } 1559 }
OLDNEW
« no previous file with comments | « test/cctest/test-object-observe.cc ('k') | test/cctest/test-symbols.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698