Home | History | Annotate | Download | only in cpp

Lines Matching refs:v8

17 #include <v8.h>
55 v8::Handle<v8::Value> GetReqScreenState(v8::Local<v8::String> property,
56 const v8::AccessorInfo &info) {
57 v8::Local<v8::Object> self = info.Holder();
58 v8::Local<v8::External> wrap =
59 v8::Local<v8::External>::Cast(self->GetInternalField(0));
63 return v8::Integer::New(state);
66 bool callOnRilRequest(v8::Handle<v8::Context> context, int request,
68 v8::HandleScope handle_scope;
69 v8::TryCatch try_catch;
72 v8::Handle<v8::String> name = v8::String::New("onRilRequest");
73 v8::Handle<v8::Value> onRilRequestFunctionValue = context->Global()->Get(name);
79 v8::Handle<v8::Function> onRilRequestFunction =
80 v8::Handle<v8::Function>::Cast(onRilRequestFunctionValue);
83 v8::Handle<v8::Value> v8RequestValue = v8::Number::New(request);
86 v8::Handle<v8::Object> params_obj =
87 v8::ObjectTemplate::New()->NewInstance();
94 v8::Handle<v8::ObjectTemplate> params_obj_template =
95 v8::ObjectTemplate::New();
97 params_obj_template->SetAccessor(v8::String::New(
103 params_obj->SetInternalField(0, v8::External::New(p));
116 v8::Handle<v8::Value> argv[argc] = { v8RequestValue, params_obj };
117 v8::Handle<v8::Value> result =
124 v8::String::Utf8Value result_string(result);
131 void testOnRilRequestUsingCppRequestObjs(v8::Handle<v8::Context> context) {
133 v8::HandleScope handle_scope;
135 v8::TryCatch try_catch;
156 v8::HandleScope handle_scope;
157 v8::TryCatch try_catch;
194 v8::HandleScope handle_scope;
195 v8::TryCatch try_catch;
231 void testProtobufV8(v8::Handle<v8::Context> context) {
233 v8::HandleScope handle_scope;
235 v8::TryCatch try_catch;
274 void experiments(v8::Handle<v8::Context> context) {