Index: test/cctest/test-api.cc |
=================================================================== |
--- test/cctest/test-api.cc (revision 3292) |
+++ test/cctest/test-api.cc (working copy) |
@@ -1344,17 +1344,10 @@ |
} |
+static bool interceptor_for_hidden_properties_called; |
static v8::Handle<Value> InterceptorForHiddenProperties( |
Local<String> name, const AccessorInfo& info) { |
- // Make sure objects move. |
- bool saved_always_compact = i::FLAG_always_compact; |
- if (!i::FLAG_never_compact) { |
- i::FLAG_always_compact = true; |
- } |
- // The whole goal of this interceptor is to cause a GC during local property |
- // lookup. |
- i::Heap::CollectAllGarbage(false); |
- i::FLAG_always_compact = saved_always_compact; |
+ interceptor_for_hidden_properties_called = true; |
return v8::Handle<Value>(); |
} |
@@ -1363,6 +1356,8 @@ |
v8::HandleScope scope; |
LocalContext context; |
+ interceptor_for_hidden_properties_called = false; |
+ |
v8::Local<v8::String> key = v8_str("api-test::hidden-key"); |
// Associate an interceptor with an object and start setting hidden values. |
@@ -1373,6 +1368,7 @@ |
Local<v8::Object> obj = function->NewInstance(); |
CHECK(obj->SetHiddenValue(key, v8::Integer::New(2302))); |
CHECK_EQ(2302, obj->GetHiddenValue(key)->Int32Value()); |
+ CHECK(!interceptor_for_hidden_properties_called); |
} |