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

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

Issue 22379002: Re-reland "Flush parallel recompilation queues on context dispose notification" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed more comments. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2819 size_t length_; 2819 size_t length_;
2820 }; 2820 };
2821 2821
2822 2822
2823 void ReleaseStackTraceDataTest(const char* source, const char* accessor) { 2823 void ReleaseStackTraceDataTest(const char* source, const char* accessor) {
2824 // Test that the data retained by the Error.stack accessor is released 2824 // Test that the data retained by the Error.stack accessor is released
2825 // after the first time the accessor is fired. We use external string 2825 // after the first time the accessor is fired. We use external string
2826 // to check whether the data is being released since the external string 2826 // to check whether the data is being released since the external string
2827 // resource's callback is fired when the external string is GC'ed. 2827 // resource's callback is fired when the external string is GC'ed.
2828 FLAG_use_ic = false; // ICs retain objects. 2828 FLAG_use_ic = false; // ICs retain objects.
2829 FLAG_parallel_recompilation = false;
2829 CcTest::InitializeVM(); 2830 CcTest::InitializeVM();
2830 v8::HandleScope scope(CcTest::isolate()); 2831 v8::HandleScope scope(CcTest::isolate());
2831 SourceResource* resource = new SourceResource(i::StrDup(source)); 2832 SourceResource* resource = new SourceResource(i::StrDup(source));
2832 { 2833 {
2833 v8::HandleScope scope(CcTest::isolate()); 2834 v8::HandleScope scope(CcTest::isolate());
2834 v8::Handle<v8::String> source_string = v8::String::NewExternal(resource); 2835 v8::Handle<v8::String> source_string = v8::String::NewExternal(resource);
2835 HEAP->CollectAllAvailableGarbage(); 2836 HEAP->CollectAllAvailableGarbage();
2836 v8::Script::Compile(source_string)->Run(); 2837 v8::Script::Compile(source_string)->Run();
2837 CHECK(!resource->IsDisposed()); 2838 CHECK(!resource->IsDisposed());
2838 } 2839 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
3379 " var a = new Array(n);" 3380 " var a = new Array(n);"
3380 " for (var i = 0; i < n; i += 100) a[i] = i;" 3381 " for (var i = 0; i < n; i += 100) a[i] = i;"
3381 "};" 3382 "};"
3382 "f(10 * 1024 * 1024);"); 3383 "f(10 * 1024 * 1024);");
3383 IncrementalMarking* marking = HEAP->incremental_marking(); 3384 IncrementalMarking* marking = HEAP->incremental_marking();
3384 if (marking->IsStopped()) marking->Start(); 3385 if (marking->IsStopped()) marking->Start();
3385 // This big step should be sufficient to mark the whole array. 3386 // This big step should be sufficient to mark the whole array.
3386 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3387 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3387 ASSERT(marking->IsComplete()); 3388 ASSERT(marking->IsComplete());
3388 } 3389 }
OLDNEW
« no previous file with comments | « test/cctest/test-deoptimization.cc ('k') | test/mjsunit/regress/regress-prepare-break-while-recompile.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698