Reviewers: jochen,
Message:
ptal
Description:
Fix object enumeration wrt access checked objects
BUG=chromium:509936
LOG=y
Please review this at https://codereview.chromium.org/1228113007/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+5, -8 lines):
M src/objects.cc
M test/cctest/test-api.cc
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
efe35ed30ecab035dc602df3b821b8f9002fd238..554f9dce970f44a62229e6dbd2eb56bf24f1aa47
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6177,9 +6177,7 @@ MaybeHandle<FixedArray>
JSReceiver::GetKeys(Handle<JSReceiver> object,
// Check access rights if required.
if (current->IsAccessCheckNeeded() && !isolate->MayAccess(current)) {
- isolate->ReportFailedAccessCheck(current);
- RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray);
- break;
+ return content;
}
// Compute the element keys.
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
c09a71484f1a0c2660d694ad5c3bf7d2e45ae0b6..ce34d7d29bd768465e5e574db57e029d362a437a
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -8169,9 +8169,9 @@ THREADED_TEST(CrossDomainForIn) {
" for (var p in obj) {"
" if (p == 'prop') return false;"
" }"
- " return false;"
- " } catch (e) {"
" return true;"
+ " } catch (e) {"
+ " return false;"
" }"
"})()");
CHECK(result->IsTrue());
@@ -8627,9 +8627,9 @@ TEST(AccessControl) {
" return false;"
" }"
" }"
- " return false;"
- " } catch (e) {"
" return true;"
+ " } catch (e) {"
+ " return false;"
" }"
"})()");
CHECK(value->IsTrue());
@@ -19362,7 +19362,6 @@ TEST(AccessCheckThrows) {
CheckCorrectThrow("%HasProperty(other, 'x')");
CheckCorrectThrow("%HasElement(other, 1)");
CheckCorrectThrow("%IsPropertyEnumerable(other, 'x')");
- CheckCorrectThrow("%GetPropertyNames(other)");
// PROPERTY_ATTRIBUTES_NONE = 0
CheckCorrectThrow("%GetOwnPropertyNames(other, 0)");
CheckCorrectThrow("%DefineAccessorPropertyUnchecked("
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.