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

Unified Diff: src/platform-win32.cc

Issue 3043007: [Isolates] Fix compile under Win32 and presumably for FreeBSD, OpenBS... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « src/platform-solaris.cc ('k') | src/v8threads.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
===================================================================
--- src/platform-win32.cc (revision 5088)
+++ src/platform-win32.cc (working copy)
@@ -1423,6 +1423,7 @@
// don't know which thread will run first (the original thread or the new
// one) so we initialize it here too.
thread->thread_handle_data()->tid_ = GetCurrentThreadId();
+ Thread::SetThreadLocal(Isolate::isolate_key(), thread->isolate());
thread->Run();
return 0;
}
@@ -1466,7 +1467,9 @@
// Initialize a Win32 thread object. The thread has an invalid thread
// handle until it is started.
-Thread::Thread() : ThreadHandle(ThreadHandle::INVALID) {
+Thread::Thread(Isolate* isolate)
+ : ThreadHandle(ThreadHandle::INVALID),
+ isolate_(isolate) {
data_ = new PlatformData(kNoThread);
}
@@ -1853,14 +1856,18 @@
static unsigned int __stdcall SamplerEntry(void* arg) {
Sampler::PlatformData* data =
reinterpret_cast<Sampler::PlatformData*>(arg);
+ Thread::SetThreadLocal(Isolate::isolate_key(), data->sampler_->isolate());
data->Runner();
return 0;
}
// Initialize a profile sampler.
-Sampler::Sampler(int interval, bool profiling)
- : interval_(interval), profiling_(profiling), active_(false) {
+Sampler::Sampler(Isolate* isolate, int interval, bool profiling)
+ : isolate_(isolate),
+ interval_(interval),
+ profiling_(profiling),
+ active_(false) {
data_ = new PlatformData(this);
}
« no previous file with comments | « src/platform-solaris.cc ('k') | src/v8threads.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698