Fix issue 142:
authoriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Dec 2008 17:40:02 +0000 (17:40 +0000)
committeriposva@chromium.org <iposva@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 17 Dec 2008 17:40:02 +0000 (17:40 +0000)
commit358591f9ea7a2953ddc41016668fcac876ee200a
tree26a090bc86dc14ed4fe8f7c1e2801cf7e0f93a9d
parent5d3cc28967e4d1db5ba9e564adbf55af48bb8055
Fix issue 142:
- Removed the potential for a NULL pointer access in
  ContextSwitcher::PreemptionReceived.
- Removed a leak of the semaphore in the ContexSwitcher thread, by removing
  the need for this semaphore entirely.
- Added a regression test case which will catch accesses to the ContextSwitcher
  singleton after it has been stopped.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@994 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/v8threads.cc
src/v8threads.h
test/cctest/SConscript
test/cctest/test-threads.cc [new file with mode: 0644]