#include "src/v8.h"
#include "src/api.h"
+#include "src/base/platform/platform.h"
#include "src/compilation-cache.h"
#include "src/execution.h"
#include "src/isolate.h"
#include "src/parser.h"
-#include "src/platform.h"
#include "src/smart-pointers.h"
#include "src/snapshot.h"
#include "src/unicode-inl.h"
// Migrating an isolate
-class KangarooThread : public v8::internal::Thread {
+class KangarooThread : public v8::base::Thread {
public:
KangarooThread(v8::Isolate* isolate, v8::Handle<v8::Context> context)
- : Thread("KangarooThread"),
+ : Thread(Options("KangarooThread")),
isolate_(isolate),
context_(isolate, context) {}
virtual void Run() = 0;
private:
- class ThreadWithSemaphore : public i::Thread {
+ class ThreadWithSemaphore : public v8::base::Thread {
public:
explicit ThreadWithSemaphore(JoinableThread* joinable_thread)
- : Thread(joinable_thread->name_),
- joinable_thread_(joinable_thread) {
- }
+ : Thread(Options(joinable_thread->name_)),
+ joinable_thread_(joinable_thread) {}
virtual void Run() {
joinable_thread_->Run();
};
const char* name_;
- i::Semaphore semaphore_;
+ v8::base::Semaphore semaphore_;
ThreadWithSemaphore thread_;
friend class ThreadWithSemaphore;
class IsolateNonlockingThread : public JoinableThread {
public:
- explicit IsolateNonlockingThread()
- : JoinableThread("IsolateNonlockingThread") {
- }
+ IsolateNonlockingThread() : JoinableThread("IsolateNonlockingThread") {}
virtual void Run() {
v8::Isolate* isolate = v8::Isolate::New();
TEST(MultithreadedParallelIsolates) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 10;
+#elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
+ const int kNThreads = 4;
#else
const int kNThreads = 50;
#endif
TEST(ExtensionsRegistration) {
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
const int kNThreads = 10;
+#elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
+ const int kNThreads = 4;
#else
const int kNThreads = 40;
#endif