Reviewers: zarko,
Message:
TBR=lukezarko
Description:
[Isolates] Fix Linux build in Isolates branch.
Please review this at http://codereview.chromium.org/3121009/show
Affected files:
M src/platform-linux.cc
M src/v8threads.cc
M test/cctest/test-log.cc
Index: src/platform-linux.cc
diff --git a/src/platform-linux.cc b/src/platform-linux.cc
index
54c4f6f06ab7e9d3023592c8a8e82a7f14c54c16..4538be2f2fba43159b7d3969880420393ccd08d5
100644
--- a/src/platform-linux.cc
+++ b/src/platform-linux.cc
@@ -748,7 +748,7 @@ static inline bool IsVmThread() {
if (isolate == NULL) return false;
ThreadManager* thread_manager = isolate->thread_manager();
- if (thread_manager->HasId() && !thread_manager->IsArchived() &&
+ if (!thread_manager->IsArchived() &&
thread_manager->CurrentId() == isolate->thread_id()) {
return true;
}
Index: src/v8threads.cc
diff --git a/src/v8threads.cc b/src/v8threads.cc
index
5b4e10da7f7013a60f5c4fc111174b1ba168c5ce..3db6abbc8838832b47d724fdc5311e0020564afd
100644
--- a/src/v8threads.cc
+++ b/src/v8threads.cc
@@ -341,7 +341,8 @@ void ThreadManager::FreeThreadResources() {
bool ThreadManager::IsArchived() {
- return Isolate::CurrentPerIsolateThreadData()->thread_state() != NULL;
+ Isolate::PerIsolateThreadData* data =
Isolate::CurrentPerIsolateThreadData();
+ return data != NULL && data->thread_state() != NULL;
}
Index: test/cctest/test-log.cc
diff --git a/test/cctest/test-log.cc b/test/cctest/test-log.cc
index
e62bec03745feac9f94fa1948389baf96a85e14e..246bbea05e14ceeecea9316e3ed07ebe513de246
100644
--- a/test/cctest/test-log.cc
+++ b/test/cctest/test-log.cc
@@ -389,7 +389,7 @@ class LoopingJsThread : public LoopingThread {
void RunLoop() {
v8::Locker locker;
CHECK(i::Isolate::Current() != NULL);
- CHECK(i::Isolate::Current()->thread_manager()->HasId());
+ CHECK(i::Isolate::Current()->thread_manager()->CurrentId() > 0);
SetV8ThreadId();
while (IsRunning()) {
v8::HandleScope scope;
@@ -417,7 +417,7 @@ class LoopingNonJsThread : public LoopingThread {
v8::Unlocker unlocker;
// Now thread has V8's id, but will not run VM code.
CHECK(i::Isolate::Current() != NULL);
- CHECK(i::Isolate::Current()->thread_manager()->HasId());
+ CHECK(i::Isolate::Current()->thread_manager()->CurrentId() > 0);
double i = 10;
SignalRunning();
while (IsRunning()) {
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev