In ProfilerSignalHandler ensure that thread we are trying to sample locked the isolate.

BUG=http://crbug.com/77725

Review URL: http://codereview.chromium.org/6837028

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7612 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vegorov@chromium.org 2011-04-14 08:53:50 +00:00
parent f7840f65f0
commit 68a8cf365f
2 changed files with 10 additions and 0 deletions

View File

@ -642,6 +642,11 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
// We require a fully initialized and entered isolate.
return;
}
if (v8::Locker::IsActive() &&
!isolate->thread_manager()->IsLockedByCurrentThread()) {
return;
}
Sampler* sampler = isolate->logger()->sampler();
if (sampler == NULL || !sampler->IsActive()) return;

View File

@ -853,6 +853,11 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
// We require a fully initialized and entered isolate.
return;
}
if (v8::Locker::IsActive() &&
!isolate->thread_manager()->IsLockedByCurrentThread()) {
return;
}
Sampler* sampler = isolate->logger()->sampler();
if (sampler == NULL || !sampler->IsActive()) return;