Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index fddefe9f82588f0f1c7fdf5a2bd308274cc9ec73..7de465d8c12986d6e1a30fba221cb0c6d3e67d72 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -9706,6 +9706,15 @@ TEST(SuperAccessControl) { |
{ |
v8::TryCatch try_catch; |
CompileRun( |
+ "function f() { return super[42]; };" |
+ "var m = f.toMethod(prohibited);" |
+ "m();"); |
+ CHECK(try_catch.HasCaught()); |
+ } |
+ |
+ { |
+ v8::TryCatch try_catch; |
+ CompileRun( |
"function f() { super.hasOwnProperty = function () {}; };" |
"var m = f.toMethod(prohibited);" |
"m();"); |