Chromium Code Reviews| 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); |
| +} |