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 {
93 gate_(v8::internal::OS::CreateSemaphore(0)),
121 v8::internal::Semaphore* gate_;
125 static v8::internal::Semaphore* all_tests_done_;
167 // A LocalContext holds a reference to a v8::Context.
170 LocalContext(v8::ExtensionConfiguration* extensions = 0,
171 v8::Handle<v8::ObjectTemplate> global_template =
172 v8::Handle<v8::ObjectTemplate>(),
173 v8::Handle<v8::Value> global_object = v8::Handle<v8::Value>())
174 : context_(v8::Context::New(extensions, global_template, global_object)) {
183 v8::Context* operator->() { return *context_; }
184 v8::Context* operator*() { return *context_; }
187 v8::Local<v8::Context> local() {
188 return v8::Local<v8::Context>::New(context_);
192 v8::Persistent<v8::Context> context_;
196 static inline v8::Local<v8::Value> v8_num(double x) {
197 return v8::Number::New(x);
201 static inline v8::Local<v8::String> v8_str(const char* x) {
202 return v8::String::New(x);
206 static inline v8::Local<v8::Script> v8_compile(const char* x) {
207 return v8::Script::Compile(v8_str(x));
212 static inline v8::Local<v8::Value> CompileRun(const char* source) {
213 return v8::Script::Compile(v8::String::New(source))->Run();