Commit 8544d67b authored by jochen@chromium.org's avatar jochen@chromium.org

Collect garbage at the beginning of cctest/test-cpu-profiler/FunctionCallSample

That way, we don't end up collecting all samples in the garbage
collector when the i18n extension is loaded.

BUG=v8:2745
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15547 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f0811f4e
......@@ -40,6 +40,7 @@ using i::CodeEntry;
using i::CpuProfile;
using i::CpuProfiler;
using i::CpuProfilesCollection;
using i::Heap;
using i::ProfileGenerator;
using i::ProfileNode;
using i::ProfilerEventsProcessor;
......@@ -995,6 +996,9 @@ TEST(FunctionCallSample) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
// Collect garbage that might have be generated while installing extensions.
HEAP->CollectAllGarbage(Heap::kNoGCFlags);
v8::Script::Compile(v8::String::New(call_function_test_source))->Run();
v8::Local<v8::Function> function = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::New("start")));
......
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