Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: src/objects.h

Issue 1242123002: Fix GetOwnPropertyNames on access-checked objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handle empty case Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index cfc572d8f9de576f9e487c8fd8f4a6dab0635428..5268236cfea5d868e1280c5699ba8afd2b1824a9 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2053,9 +2053,9 @@ class JSObject: public JSReceiver {
// with the specified attributes (ignoring interceptors).
int NumberOfOwnProperties(PropertyAttributes filter = NONE);
// Fill in details for properties into storage starting at the specified
- // index.
- void GetOwnPropertyNames(
- FixedArray* storage, int index, PropertyAttributes filter = NONE);
+ // index. Returns the number of properties added.
+ int GetOwnPropertyNames(FixedArray* storage, int index,
+ PropertyAttributes filter = NONE);
// Returns the number of properties on this object filtering out properties
// with the specified attributes (ignoring interceptors).
@@ -2283,6 +2283,9 @@ class JSObject: public JSReceiver {
static void DeleteNormalizedProperty(Handle<JSObject> object,
Handle<Name> name, int entry);
+ static bool AllCanRead(LookupIterator* it);
+ static bool AllCanWrite(LookupIterator* it);
+
private:
friend class JSReceiver;
friend class Object;
@@ -3249,13 +3252,10 @@ class Dictionary: public HashTable<Derived, Shape, Key> {
enum SortMode { UNSORTED, SORTED };
- // Copies keys to preallocated fixed array.
- void CopyKeysTo(FixedArray* storage, PropertyAttributes filter,
- SortMode sort_mode);
-
// Fill in details for properties into storage.
- void CopyKeysTo(FixedArray* storage, int index, PropertyAttributes filter,
- SortMode sort_mode);
+ // Returns the number of properties added.
+ int CopyKeysTo(FixedArray* storage, int index, PropertyAttributes filter,
+ SortMode sort_mode);
// Copies enumerable keys to preallocated fixed array.
void CopyEnumKeysTo(FixedArray* storage);
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698