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

Unified Diff: test/cctest/test-debug.cc

Issue 760883002: Add interceptor support for symbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-decls.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index 8823c676e4d1bf037d4f9c3c5b8844f6421ac66c..f6c5aab509d3260e0473bfc6eda5a613adf3c450 100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -4350,9 +4350,10 @@ static void IndexedEnum(const v8::PropertyCallbackInfo<v8::Array>& info) {
}
-static void NamedGetter(v8::Local<v8::String> name,
+static void NamedGetter(v8::Local<v8::Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
- v8::String::Utf8Value n(name);
+ if (name->IsSymbol()) return;
+ v8::String::Utf8Value n(v8::Local<v8::String>::Cast(name));
if (strcmp(*n, "a") == 0) {
info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), "AA"));
return;
@@ -4385,7 +4386,8 @@ TEST(InterceptorPropertyMirror) {
// Create object with named interceptor.
v8::Handle<v8::ObjectTemplate> named = v8::ObjectTemplate::New(isolate);
- named->SetNamedPropertyHandler(NamedGetter, NULL, NULL, NULL, NamedEnum);
+ named->SetHandler(v8::NamedPropertyHandlerConfiguration(
+ NamedGetter, NULL, NULL, NULL, NamedEnum));
env->Global()->Set(
v8::String::NewFromUtf8(isolate, "intercepted_named"),
named->NewInstance());
@@ -4403,7 +4405,8 @@ TEST(InterceptorPropertyMirror) {
// Create object with both named and indexed interceptor.
v8::Handle<v8::ObjectTemplate> both = v8::ObjectTemplate::New(isolate);
- both->SetNamedPropertyHandler(NamedGetter, NULL, NULL, NULL, NamedEnum);
+ both->SetHandler(v8::NamedPropertyHandlerConfiguration(
+ NamedGetter, NULL, NULL, NULL, NamedEnum));
both->SetIndexedPropertyHandler(IndexedGetter, NULL, NULL, NULL, IndexedEnum);
env->Global()->Set(
v8::String::NewFromUtf8(isolate, "intercepted_both"),
« no previous file with comments | « 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