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

Unified Diff: src/execution.cc

Issue 6788023: Per-isolate v8::Locker and v8::Unlocker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New tests for IsLocker Created 9 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 side-by-side diff with in-line comments
Download patch
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index eb26438fe87af6a1d264b3b9ad32ad0efab6e8e8..b0a9b09b5e9af1b00d52b148140d56468bc11125 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -457,11 +457,14 @@ void StackGuard::ClearThread(const ExecutionAccess& lock) {
void StackGuard::InitThread(const ExecutionAccess& lock) {
if (thread_local_.Initialize()) isolate_->heap()->SetStackLimits();
- uintptr_t stored_limit =
- Isolate::CurrentPerIsolateThreadData()->stack_limit();
- // You should hold the ExecutionAccess lock when you call this.
- if (stored_limit != 0) {
- StackGuard::SetStackLimit(stored_limit);
+ Isolate::PerIsolateThreadData* per_thread =
+ isolate_->FindOrAllocatePerThreadDataForThisThread();
Vitaly Repeshko 2011/04/15 00:29:39 Are you sure you need "OrAllocate" here?
Dmitry Lomov 2011/04/19 01:50:47 It is actually the if below that was bogus - done
+ if (per_thread != NULL) {
+ uintptr_t stored_limit = per_thread->stack_limit();
+ // You should hold the ExecutionAccess lock when you call this.
+ if (stored_limit != 0) {
+ StackGuard::SetStackLimit(stored_limit);
+ }
}
}

Powered by Google App Engine
This is Rietveld 408576698