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

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

Issue 6452004: Fix issues with using defineProperty on the global proxy object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index f88ba384d785aa57517739b7a09ef3635855ce09..681d6f84366740605ee3962150d3bc18da5a6abe 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -12549,3 +12549,19 @@ TEST(NamedEnumeratorAndForIn) {
CHECK_EQ(1, result->Length());
CHECK_EQ(v8_str("universalAnswer"), result->Get(0));
}
+
+
+TEST(DefinePropertyPostDetach) {
+ v8::HandleScope scope;
+ LocalContext context;
+ v8::Handle<v8::Object> proxy = context->Global();
+ v8::Handle<v8::Function> define_property =
+ CompileRun("(function() {"
+ " Object.defineProperty("
+ " this,"
+ " 1,"
+ " { configurable: true, defineProperty: true, value: 3 });"
Rico 2011/02/08 14:23:46 a descriptor does not normally have a defineProper
Mads Ager (chromium) 2011/02/08 16:30:18 Done.
+ "})").As<Function>();
+ context->DetachGlobal();
+ define_property->Call(proxy, 0, NULL);
+}

Powered by Google App Engine
This is Rietveld 408576698