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

Side by Side Diff: src/elements.h

Issue 2219803002: [keys] Throw a range error if the number of keys overflow FixedArray::kMaxLength (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: formatting Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/elements.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ELEMENTS_H_ 5 #ifndef V8_ELEMENTS_H_
6 #define V8_ELEMENTS_H_ 6 #define V8_ELEMENTS_H_
7 7
8 #include "src/elements-kind.h" 8 #include "src/elements-kind.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 KeyAccumulator* keys) { 87 KeyAccumulator* keys) {
88 CollectElementIndices(object, handle(object->elements(), keys->isolate()), 88 CollectElementIndices(object, handle(object->elements(), keys->isolate()),
89 keys); 89 keys);
90 } 90 }
91 91
92 virtual Maybe<bool> CollectValuesOrEntries( 92 virtual Maybe<bool> CollectValuesOrEntries(
93 Isolate* isolate, Handle<JSObject> object, 93 Isolate* isolate, Handle<JSObject> object,
94 Handle<FixedArray> values_or_entries, bool get_entries, int* nof_items, 94 Handle<FixedArray> values_or_entries, bool get_entries, int* nof_items,
95 PropertyFilter filter = ALL_PROPERTIES) = 0; 95 PropertyFilter filter = ALL_PROPERTIES) = 0;
96 96
97 virtual Handle<FixedArray> PrependElementIndices( 97 virtual MaybeHandle<FixedArray> PrependElementIndices(
98 Handle<JSObject> object, Handle<FixedArrayBase> backing_store, 98 Handle<JSObject> object, Handle<FixedArrayBase> backing_store,
99 Handle<FixedArray> keys, GetKeysConversion convert, 99 Handle<FixedArray> keys, GetKeysConversion convert,
100 PropertyFilter filter = ALL_PROPERTIES) = 0; 100 PropertyFilter filter = ALL_PROPERTIES) = 0;
101 101
102 inline Handle<FixedArray> PrependElementIndices( 102 inline MaybeHandle<FixedArray> PrependElementIndices(
103 Handle<JSObject> object, Handle<FixedArray> keys, 103 Handle<JSObject> object, Handle<FixedArray> keys,
104 GetKeysConversion convert, PropertyFilter filter = ALL_PROPERTIES) { 104 GetKeysConversion convert, PropertyFilter filter = ALL_PROPERTIES) {
105 return PrependElementIndices(object, handle(object->elements()), keys, 105 return PrependElementIndices(object, handle(object->elements()), keys,
106 convert, filter); 106 convert, filter);
107 } 107 }
108 108
109 virtual void AddElementsToKeyAccumulator(Handle<JSObject> receiver, 109 virtual void AddElementsToKeyAccumulator(Handle<JSObject> receiver,
110 KeyAccumulator* accumulator, 110 KeyAccumulator* accumulator,
111 AddKeyConversion convert) = 0; 111 AddKeyConversion convert) = 0;
112 112
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 bool allow_appending = false); 195 bool allow_appending = false);
196 196
197 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 197 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
198 Handle<JSArray> array, 198 Handle<JSArray> array,
199 Arguments* args); 199 Arguments* args);
200 200
201 } // namespace internal 201 } // namespace internal
202 } // namespace v8 202 } // namespace v8
203 203
204 #endif // V8_ELEMENTS_H_ 204 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698