Lines Matching refs:v8

18 static const char* to_cstring(const v8::String::Utf8Value& value) {  in to_cstring()
33 void Global::reportException(v8::TryCatch* tryCatch) { in reportException()
34 v8::HandleScope handleScope(fIsolate); in reportException()
35 v8::String::Utf8Value exception(tryCatch->Exception()); in reportException()
37 v8::Handle<v8::Message> message = tryCatch->Message(); in reportException()
44 v8::String::Utf8Value filename(message->GetScriptOrigin().ResourceName()); in reportException()
50 v8::String::Utf8Value sourceline(message->GetSourceLine()); in reportException()
63 v8::String::Utf8Value stackTrace(tryCatch->StackTrace()); in reportException()
75 void Global::Inval(const v8::FunctionCallbackInfo<v8::Value>& args) { in Inval()
84 void Global::Print(const v8::FunctionCallbackInfo<v8::Value>& args) { in Print()
86 v8::HandleScope handleScope(args.GetIsolate()); in Print()
93 v8::String::Utf8Value str(args[i]); in Print()
104 void Global::SetTimeout(const v8::FunctionCallbackInfo<v8::Value>& args) { in SetTimeout()
107 v8::String::NewFromUtf8( in SetTimeout()
117 v8::Handle<v8::Function> timeoutFn = v8::Handle<v8::Function>::Cast(args[0]); in SetTimeout()
130 args.GetReturnValue().Set(v8::Integer::New(gGlobal->fIsolate, id)); in SetTimeout()
136 v8::HandleScope handleScope(gGlobal->getIsolate()); in TimeOutProc()
139 v8::Local<v8::Context> context = gGlobal->getContext(); in TimeOutProc()
142 v8::Context::Scope contextScope(context); in TimeOutProc()
145 v8::TryCatch tryCatch; in TimeOutProc()
154 v8::Local<v8::Function> onTimeout = in TimeOutProc()
155 v8::Local<v8::Function>::New(gGlobal->getIsolate(), gGlobal->fTimeouts[id]); in TimeOutProc()
156 v8::Handle<v8::Value> result = onTimeout->Call(context->Global(), argc, NULL); in TimeOutProc()
169 v8::String::Utf8Value str(result); in TimeOutProc()
178 v8::Handle<v8::Context> Global::createRootContext() { in createRootContext()
180 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); in createRootContext()
182 global->Set(v8::String::NewFromUtf8(fIsolate, "print"), in createRootContext()
183 v8::FunctionTemplate::New(fIsolate, Global::Print)); in createRootContext()
184 global->Set(v8::String::NewFromUtf8(fIsolate, "setTimeout"), in createRootContext()
185 v8::FunctionTemplate::New(fIsolate, Global::SetTimeout)); in createRootContext()
186 global->Set(v8::String::NewFromUtf8(fIsolate, "inval"), in createRootContext()
187 v8::FunctionTemplate::New(fIsolate, Global::Inval)); in createRootContext()
190 return v8::Context::New(fIsolate, NULL, global); in createRootContext()
195 v8::HandleScope handleScope(fIsolate); in initialize()
198 v8::Handle<v8::Context> context = this->createRootContext(); in initialize()
213 v8::HandleScope handleScope(fIsolate); in parseScript()
216 v8::Handle<v8::Context> context = this->getContext(); in parseScript()
219 v8::Context::Scope contextScope(context); in parseScript()
221 v8::TryCatch tryCatch; in parseScript()
224 v8::Handle<v8::String> source = v8::String::NewFromUtf8(fIsolate, script); in parseScript()
225 v8::Handle<v8::Script> compiledScript = v8::Script::Compile(source); in parseScript()
234 v8::Handle<v8::Value> result = compiledScript->Run(); in parseScript()