Lines Matching refs:v8
1 // Copyright 2008 the V8 project authors. All rights reserved.
31 #include "v8.h"
80 // the tests alternate, not relying solely on the big V8 lock.
87 class ApiTestFuzzer: public v8::internal::Thread {
90 explicit ApiTestFuzzer(v8::internal::Isolate* isolate, int num)
93 gate_(v8::internal::OS::CreateSemaphore(0)),
116 v8::internal::Semaphore* gate_;
120 static v8::internal::Semaphore* all_tests_done_;
162 // A LocalContext holds a reference to a v8::Context.
165 LocalContext(v8::ExtensionConfiguration* extensions = 0,
166 v8::Handle<v8::ObjectTemplate> global_template =
167 v8::Handle<v8::ObjectTemplate>(),
168 v8::Handle<v8::Value> global_object = v8::Handle<v8::Value>())
169 : context_(v8::Context::New(extensions, global_template, global_object)) {
178 v8::Context* operator->() { return *context_; }
179 v8::Context* operator*() { return *context_; }
182 v8::Local<v8::Context> local() {
183 return v8::Local<v8::Context>::New(context_);
187 v8::Persistent<v8::Context> context_;
191 static inline v8::Local<v8::Value> v8_num(double x) {
192 return v8::Number::New(x);
196 static inline v8::Local<v8::String> v8_str(const char* x) {
197 return v8::String::New(x);
201 static inline v8::Local<v8::Script> v8_compile(const char* x) {
202 return v8::Script::Compile(v8_str(x));
207 static inline v8::Local<v8::Value> CompileRun(const char* source) {
208 return v8::Script::Compile(v8::String::New(source))->Run();