Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1271)

Side by Side Diff: test/cctest/test-debug.cc

Issue 467013003: Add interceptor support for symbols (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits, update test suite Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 4246 matching lines...) Expand 10 before | Expand all | Expand 10 after
4257 4257
4258 static void IndexedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) { 4258 static void IndexedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
4259 v8::Isolate* isolate = info.GetIsolate(); 4259 v8::Isolate* isolate = info.GetIsolate();
4260 v8::Handle<v8::Array> result = v8::Array::New(isolate, 2); 4260 v8::Handle<v8::Array> result = v8::Array::New(isolate, 2);
4261 result->Set(v8::Integer::New(isolate, 0), v8::Number::New(isolate, 1)); 4261 result->Set(v8::Integer::New(isolate, 0), v8::Number::New(isolate, 1));
4262 result->Set(v8::Integer::New(isolate, 1), v8::Number::New(isolate, 10)); 4262 result->Set(v8::Integer::New(isolate, 1), v8::Number::New(isolate, 10));
4263 info.GetReturnValue().Set(result); 4263 info.GetReturnValue().Set(result);
4264 } 4264 }
4265 4265
4266 4266
4267 static void NamedGetter(v8::Local<v8::String> name, 4267 static void NamedGetter(v8::Local<v8::Name> name,
4268 const v8::PropertyCallbackInfo<v8::Value>& info) { 4268 const v8::PropertyCallbackInfo<v8::Value>& info) {
4269 v8::String::Utf8Value n(name); 4269 if (name->IsSymbol()) return;
4270 v8::String::Utf8Value n(v8::Local<v8::String>::Cast(name));
4270 if (strcmp(*n, "a") == 0) { 4271 if (strcmp(*n, "a") == 0) {
4271 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "AA")); 4272 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "AA"));
4272 return; 4273 return;
4273 } else if (strcmp(*n, "b") == 0) { 4274 } else if (strcmp(*n, "b") == 0) {
4274 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "BB")); 4275 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "BB"));
4275 return; 4276 return;
4276 } else if (strcmp(*n, "c") == 0) { 4277 } else if (strcmp(*n, "c") == 0) {
4277 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "CC")); 4278 info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "CC"));
4278 return; 4279 return;
4279 } else { 4280 } else {
(...skipping 3118 matching lines...) Expand 10 before | Expand all | Expand 10 after
7398 v8::Isolate* isolate = env->GetIsolate(); 7399 v8::Isolate* isolate = env->GetIsolate();
7399 v8::HandleScope scope(isolate); 7400 v8::HandleScope scope(isolate);
7400 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate); 7401 v8::Debug::SetDebugEventListener(DebugBreakTriggerTerminate);
7401 TerminationThread terminator(isolate); 7402 TerminationThread terminator(isolate);
7402 terminator.Start(); 7403 terminator.Start();
7403 v8::TryCatch try_catch; 7404 v8::TryCatch try_catch;
7404 v8::Debug::DebugBreak(isolate); 7405 v8::Debug::DebugBreak(isolate);
7405 CompileRun("while (true);"); 7406 CompileRun("while (true);");
7406 CHECK(try_catch.HasTerminated()); 7407 CHECK(try_catch.HasTerminated());
7407 } 7408 }
OLDNEW
« src/objects.cc ('K') | « test/cctest/test-api.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698