Index: test/cctest/test-object-observe.cc |
diff --git a/test/cctest/test-object-observe.cc b/test/cctest/test-object-observe.cc |
index a9f840e7adc7f0d0b48ed3a600baed1698ce64b2..b4488a603a981a9e420abda0fc00f66e28c4b4de 100644 |
--- a/test/cctest/test-object-observe.cc |
+++ b/test/cctest/test-object-observe.cc |
@@ -720,3 +720,18 @@ TEST(AccessCheckDisallowApiModifications) { |
} |
CHECK(CompileRun("records")->IsNull()); |
} |
+ |
+ |
+TEST(HiddenPropertiesLeakage) { |
+ HarmonyIsolate isolate; |
+ HandleScope scope(isolate.GetIsolate()); |
+ LocalContext context(isolate.GetIsolate()); |
+ CompileRun("var obj = {};" |
+ "var records = null;" |
+ "var observer = function(r) { records = r };" |
+ "Object.observe(obj, observer);"); |
+ Handle<Value> obj = context->Global()->Get(String::New("obj")); |
+ Handle<Object>::Cast(obj)->SetHiddenValue(String::New("foo"), Null()); |
+ CompileRun(""); // trigger delivery |
+ CHECK(CompileRun("records")->IsNull()); |
+} |