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

Side by Side 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: Code review feedback 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 450
451 451
452 void StackGuard::ClearThread(const ExecutionAccess& lock) { 452 void StackGuard::ClearThread(const ExecutionAccess& lock) {
453 thread_local_.Clear(); 453 thread_local_.Clear();
454 isolate_->heap()->SetStackLimits(); 454 isolate_->heap()->SetStackLimits();
455 } 455 }
456 456
457 457
458 void StackGuard::InitThread(const ExecutionAccess& lock) { 458 void StackGuard::InitThread(const ExecutionAccess& lock) {
459 if (thread_local_.Initialize()) isolate_->heap()->SetStackLimits(); 459 if (thread_local_.Initialize()) isolate_->heap()->SetStackLimits();
460 uintptr_t stored_limit = 460 Isolate::PerIsolateThreadData* per_thread =
461 Isolate::CurrentPerIsolateThreadData()->stack_limit(); 461 isolate_->FindOrAllocatePerThreadDataForThisThread();
462 uintptr_t stored_limit = per_thread->stack_limit();
462 // You should hold the ExecutionAccess lock when you call this. 463 // You should hold the ExecutionAccess lock when you call this.
463 if (stored_limit != 0) { 464 if (stored_limit != 0) {
464 StackGuard::SetStackLimit(stored_limit); 465 StackGuard::SetStackLimit(stored_limit);
465 } 466 }
466 } 467 }
467 468
468 469
469 // --- C a l l s t o n a t i v e s --- 470 // --- C a l l s t o n a t i v e s ---
470 471
471 #define RETURN_NATIVE_CALL(name, argc, argv, has_pending_exception) \ 472 #define RETURN_NATIVE_CALL(name, argc, argv, has_pending_exception) \
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 return isolate->TerminateExecution(); 783 return isolate->TerminateExecution();
783 } 784 }
784 if (stack_guard->IsInterrupted()) { 785 if (stack_guard->IsInterrupted()) {
785 stack_guard->Continue(INTERRUPT); 786 stack_guard->Continue(INTERRUPT);
786 return isolate->StackOverflow(); 787 return isolate->StackOverflow();
787 } 788 }
788 return isolate->heap()->undefined_value(); 789 return isolate->heap()->undefined_value();
789 } 790 }
790 791
791 } } // namespace v8::internal 792 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698