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

Side by Side Diff: src/objects.h

Issue 7565009: Fix out-of-bounds access in fetching propery names (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: additional fixes Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2792 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 2803
2804 // Returns the number of enumerable elements in the dictionary. 2804 // Returns the number of enumerable elements in the dictionary.
2805 int NumberOfEnumElements(); 2805 int NumberOfEnumElements();
2806 2806
2807 enum SortMode { UNSORTED, SORTED }; 2807 enum SortMode { UNSORTED, SORTED };
2808 // Copies keys to preallocated fixed array. 2808 // Copies keys to preallocated fixed array.
2809 void CopyKeysTo(FixedArray* storage, 2809 void CopyKeysTo(FixedArray* storage,
2810 PropertyAttributes filter, 2810 PropertyAttributes filter,
2811 SortMode sort_mode); 2811 SortMode sort_mode);
2812 // Fill in details for properties into storage. 2812 // Fill in details for properties into storage.
2813 void CopyKeysTo(FixedArray* storage, SortMode sort_mode); 2813 void CopyKeysTo(FixedArray* storage, int index, SortMode sort_mode);
2814 2814
2815 // Accessors for next enumeration index. 2815 // Accessors for next enumeration index.
2816 void SetNextEnumerationIndex(int index) { 2816 void SetNextEnumerationIndex(int index) {
2817 this->fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index)); 2817 this->fast_set(this, kNextEnumerationIndexIndex, Smi::FromInt(index));
2818 } 2818 }
2819 2819
2820 int NextEnumerationIndex() { 2820 int NextEnumerationIndex() {
2821 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value(); 2821 return Smi::cast(FixedArray::get(kNextEnumerationIndexIndex))->value();
2822 } 2822 }
2823 2823
(...skipping 4490 matching lines...) Expand 10 before | Expand all | Expand 10 after
7314 } else { 7314 } else {
7315 value &= ~(1 << bit_position); 7315 value &= ~(1 << bit_position);
7316 } 7316 }
7317 return value; 7317 return value;
7318 } 7318 }
7319 }; 7319 };
7320 7320
7321 } } // namespace v8::internal 7321 } } // namespace v8::internal
7322 7322
7323 #endif // V8_OBJECTS_H_ 7323 #endif // V8_OBJECTS_H_
OLDNEW
« 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