Lines Matching refs:v8
32 #include <v8.h>
218 v8::Handle<v8::Context> context_;
221 UnsolicitedThread(v8::Handle<v8::Context> context) :
226 v8::HandleScope handle_scope;
229 v8::Handle<v8::String> name = v8::String::New("onUnsolicitedTick");
230 v8::Handle<v8::Value> functionValue = context_->Global()->Get(name);
231 v8::Handle<v8::Function> onUnsolicitedTick =
232 v8::Handle<v8::Function>::Cast(functionValue);
235 v8::Handle<v8::Value> v8TickValue = v8::Number::New(tick);
236 v8::Handle<v8::Value> argv[1] = { v8TickValue };
238 v8::Handle<v8::Value> resultValue =
248 v8::Locker locker;
252 v8::HandleScope handle_scope;
253 v8::Context::Scope context_scope(context_);
259 v8::Unlocker unlocker;
261 v8::Locker locker;
271 void startMockRil(v8::Handle<v8::Context> context) {
272 v8::HandleScope handle_scope;
273 v8::TryCatch try_catch;
276 v8::Handle<v8::String> name = v8::String::New("startMockRil");
277 v8::Handle<v8::Value> functionValue = context->Global()->Get(name);
278 v8::Handle<v8::Function> start =
279 v8::Handle<v8::Function>::Cast(functionValue);
281 v8::Handle<v8::Value> result = start->Call(context->Global(), 0, NULL);
287 v8::String::Utf8Value result_string(result);
301 // Initialize V8
302 v8::V8::Initialize();
305 v8::Locker locker;
312 v8::Persistent<v8::Context> context = makeJsContext();
313 v8::Context::Scope context_scope(context);
314 v8::TryCatch try_catch;