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

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

Issue 156623002: swap in global proxy on accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: all arches done Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | 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 a3ce5c37ec8f10feb0d62d7b57e7b905d9f6b376..bda09f01a0ed4380ed0cfab93fed12f477c14580 100644
--- a/test/cctest/test-accessors.cc
+++ b/test/cctest/test-accessors.cc
@@ -606,3 +606,21 @@ THREADED_TEST(AccessorPropertyCrossContext) {
"for (var i = 0; i < 10; i++) o.n;");
CHECK(!try_catch.HasCaught());
}
+
+
+THREADED_TEST(GlobalObjectAccessor) {
+ LocalContext env;
+ v8::Isolate* isolate = env->GetIsolate();
+ v8::HandleScope scope(isolate);
+ CompileRun(
+ "var set_value = 1;"
+ "Object.defineProperty(this.__proto__, 'x', {"
+ " get : function() { return this; },"
+ " set : function() { set_value = this; }"
+ "});"
+ "function getter() { return x; }"
+ "function setter() { x = 1; }"
+ "for (var i = 0; i < 4; i++) { getter(); setter(); }");
+ CHECK(v8::Utils::OpenHandle(*CompileRun("getter()"))->IsJSGlobalProxy());
+ CHECK(v8::Utils::OpenHandle(*CompileRun("set_value"))->IsJSGlobalProxy());
+}
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698