Index: test/cctest/test-api.cc |
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc |
index 21de33d09ae8fcdec688d6e8bef2e29f39ae88b5..28ff3920022351901fba9dac4c62f543b193c582 100644 |
--- a/test/cctest/test-api.cc |
+++ b/test/cctest/test-api.cc |
@@ -8294,7 +8294,7 @@ THREADED_TEST(CrossDomainForInOnPrototype) { |
// Change env2 to a different domain and set env1's global object |
// as the __proto__ of an object in env2 and enumerate properties |
// in for-in. It shouldn't enumerate properties on env1's global |
- // object. |
+ // object. It shouldn't throw either, just silently ignore them. |
env2->SetSecurityToken(bar); |
{ |
Context::Scope scope_env2(env2); |
@@ -8305,9 +8305,9 @@ THREADED_TEST(CrossDomainForInOnPrototype) { |
" for (var p in obj) {" |
" if (p == 'prop') return false;" |
" }" |
- " return false;" |
- " } catch (e) {" |
" return true;" |
+ " } catch (e) {" |
+ " return false;" |
" }" |
"})()"); |
CHECK(result->IsTrue()); |
@@ -8753,6 +8753,7 @@ TEST(AccessControl) { |
// Enumeration doesn't enumerate accessors from inaccessible objects in |
// the prototype chain even if the accessors are in themselves accessible. |
+ // Enumeration doesn't throw, it silently ignores what it can't access. |
value = CompileRun( |
"(function() {" |
" var obj = { '__proto__': other };" |
@@ -8764,9 +8765,9 @@ TEST(AccessControl) { |
" return false;" |
" }" |
" }" |
- " return false;" |
- " } catch (e) {" |
" return true;" |
+ " } catch (e) {" |
+ " return false;" |
" }" |
"})()"); |
CHECK(value->IsTrue()); |