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

Unified Diff: test/cctest/test-accessors.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 | « src/v8natives.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-accessors.cc
diff --git a/test/cctest/test-accessors.cc b/test/cctest/test-accessors.cc
index 5bf61c8fcac0a22f3c8bdf6efebeb99209c9df15..2446e0c8aaf5635514ed8a4c982e99d10b7c09d3 100644
--- a/test/cctest/test-accessors.cc
+++ b/test/cctest/test-accessors.cc
@@ -38,6 +38,7 @@ using ::v8::ObjectTemplate;
using ::v8::Value;
using ::v8::Context;
using ::v8::Local;
+using ::v8::Name;
using ::v8::String;
using ::v8::Script;
using ::v8::Function;
@@ -513,7 +514,7 @@ void JSONStringifyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info) {
}
-void JSONStringifyGetter(Local<String> name,
+void JSONStringifyGetter(Local<Name> name,
const v8::PropertyCallbackInfo<v8::Value>& info) {
info.GetReturnValue().Set(v8_str("crbug-161028"));
}
@@ -525,8 +526,8 @@ THREADED_TEST(JSONStringifyNamedInterceptorObject) {
v8::HandleScope scope(isolate);
v8::Handle<v8::ObjectTemplate> obj = ObjectTemplate::New(isolate);
- obj->SetNamedPropertyHandler(
- JSONStringifyGetter, NULL, NULL, NULL, JSONStringifyEnumerator);
+ obj->SetHandler(v8::NamedPropertyHandlerConfiguration(
+ JSONStringifyGetter, NULL, NULL, NULL, JSONStringifyEnumerator));
env->Global()->Set(v8_str("obj"), obj->NewInstance());
v8::Handle<v8::String> expected = v8_str("{\"regress\":\"crbug-161028\"}");
CHECK(CompileRun("JSON.stringify(obj)")->Equals(expected));
« no previous file with comments | « src/v8natives.js ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698