Lines Matching refs:v8
49 using v8::internal::Address;
50 using v8::internal::EmbeddedVector;
51 using v8::internal::Logger;
52 using v8::internal::StrLength;
68 ScopedLoggerInitializer(bool saved_log, bool saved_prof, v8::Isolate* isolate) in ScopedLoggerInitializer()
75 env_(v8::Context::New(isolate)), in ScopedLoggerInitializer()
88 v8::Local<v8::Context>& env() { return env_; } in env()
90 v8::Isolate* isolate() { return isolate_; } in isolate()
106 v8::Isolate* isolate_;
107 v8::Isolate::Scope isolate_scope_;
108 v8::HandleScope scope_;
109 v8::Local<v8::Context> env_;
133 class LoopingThread : public v8::internal::Thread {
135 explicit LoopingThread(v8::internal::Isolate* isolate)
136 : v8::internal::Thread(isolate),
137 semaphore_(new v8::internal::Semaphore(0)),
160 v8_thread_id_ = v8::V8::GetCurrentThreadId();
166 v8::internal::Semaphore* semaphore_;
175 explicit LoopingJsThread(v8::internal::Isolate* isolate)
178 v8::Locker locker;
183 v8::HandleScope scope;
184 v8::Persistent<v8::Context> context = v8::Context::New();
187 v8::Context::Scope context_scope(context);
193 i::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(1));
201 explicit LoopingNonJsThread(v8::internal::Isolate* isolate)
204 v8::Locker locker;
205 v8::Unlocker unlocker;
213 i::OS::Sleep(v8::base::TimeDelta::FromMilliseconds(1));
219 class TestSampler : public v8::internal::Sampler {
221 explicit TestSampler(v8::internal::Isolate* isolate)
223 semaphore_(new v8::internal::Semaphore(0)),
229 void SampleStack(v8::internal::TickSample*) {
233 void Tick(v8::internal::TickSample*) { semaphore_->Signal(); }
242 v8::internal::Semaphore* semaphore_;
252 v8::Locker locker;
292 class SimpleExternalString : public v8::String::ExternalStringResource {
309 v8::HandleScope scope(CcTest::isolate()); in TEST()
310 v8::Local<v8::Context> env = v8::Context::New(CcTest::isolate()); in TEST()
314 v8::Local<v8::String> source = in TEST()
315 v8::String::NewExternalTwoByte(CcTest::isolate(), &source_ext_str) in TEST()
318 v8::Local<v8::String> origin = in TEST()
319 v8::String::NewFromUtf8(CcTest::isolate(), "issue-23768-test", in TEST()
320 v8::NewStringType::kNormal) in TEST()
322 v8::Local<v8::Script> evil_script = CompileWithOrigin(source, origin); in TEST()
326 i::ExternalTwoByteString::cast(*v8::Utils::OpenHandle(*source))); in TEST()
336 static void ObjMethod1(const v8::FunctionCallbackInfo<v8::Value>& args) { in ObjMethod1()
342 v8::Isolate::CreateParams create_params; in TEST()
344 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
349 v8::Local<v8::FunctionTemplate> obj = v8::Local<v8::FunctionTemplate>::New( in TEST()
350 isolate, v8::FunctionTemplate::New(isolate)); in TEST()
352 v8::Local<v8::ObjectTemplate> proto = obj->PrototypeTemplate(); in TEST()
353 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, obj); in TEST()
355 v8::FunctionTemplate::New(isolate, ObjMethod1, in TEST()
356 v8::Local<v8::Value>(), signature), in TEST()
357 static_cast<v8::PropertyAttribute>(v8::DontDelete)); in TEST()
388 static void Prop1Getter(v8::Local<v8::String> property, in Prop1Getter()
389 const v8::PropertyCallbackInfo<v8::Value>& info) { in Prop1Getter()
392 static void Prop1Setter(v8::Local<v8::String> property, in Prop1Setter()
393 v8::Local<v8::Value> value, in Prop1Setter()
394 const v8::PropertyCallbackInfo<void>& info) { in Prop1Setter()
397 static void Prop2Getter(v8::Local<v8::String> property, in Prop2Getter()
398 const v8::PropertyCallbackInfo<v8::Value>& info) { in Prop2Getter()
404 v8::Isolate::CreateParams create_params; in TEST()
406 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
411 v8::Local<v8::FunctionTemplate> obj = v8::Local<v8::FunctionTemplate>::New( in TEST()
412 isolate, v8::FunctionTemplate::New(isolate)); in TEST()
414 v8::Local<v8::ObjectTemplate> inst = obj->InstanceTemplate(); in TEST()
474 v8::Isolate::CreateParams create_params; in TEST()
476 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
500 v8::Local<v8::String> log_str = in TEST()
501 v8::String::NewFromUtf8(isolate, log.start(), in TEST()
502 v8::NewStringType::kNormal, log.length()) in TEST()
510 v8::Local<v8::String> source_str = in TEST()
511 v8::String::NewFromUtf8(isolate, source.start(), in TEST()
512 v8::NewStringType::kNormal, source.length()) in TEST()
514 v8::TryCatch try_catch(isolate); in TEST()
515 v8::Local<v8::Script> script = CompileWithOrigin(source_str, ""); in TEST()
517 v8::String::Utf8Value exception(try_catch.Exception()); in TEST()
521 v8::Local<v8::Value> result; in TEST()
523 v8::String::Utf8Value exception(try_catch.Exception()); in TEST()
529 v8::Local<v8::String> s = in TEST()
546 v8::Isolate::CreateParams create_params; in TEST()
548 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()
580 v8::Isolate::CreateParams create_params; in TEST()
582 v8::Isolate* isolate = v8::Isolate::New(create_params); in TEST()