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

Side by Side Diff: src/objects.h

Issue 226133002: Compare external pixel data length against Smi::kMaxValue (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | « src/api.cc ('k') | no next file » | 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 // 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 4675 matching lines...) Expand 10 before | Expand all | Expand 10 after
4686 public: 4686 public:
4687 inline bool is_the_hole(int index) { return false; } 4687 inline bool is_the_hole(int index) { return false; }
4688 4688
4689 // [external_pointer]: The pointer to the external memory area backing this 4689 // [external_pointer]: The pointer to the external memory area backing this
4690 // external array. 4690 // external array.
4691 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store. 4691 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store.
4692 4692
4693 // Casting. 4693 // Casting.
4694 static inline ExternalArray* cast(Object* obj); 4694 static inline ExternalArray* cast(Object* obj);
4695 4695
4696 // Maximal acceptable length for an external array.
4697 static const int kMaxLength = 0x3fffffff;
4698
4699 // ExternalArray headers are not quadword aligned. 4696 // ExternalArray headers are not quadword aligned.
4700 static const int kExternalPointerOffset = 4697 static const int kExternalPointerOffset =
4701 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); 4698 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize);
4702 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; 4699 static const int kHeaderSize = kExternalPointerOffset + kPointerSize;
4703 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); 4700 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
4704 4701
4705 private: 4702 private:
4706 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); 4703 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray);
4707 }; 4704 };
4708 4705
(...skipping 6110 matching lines...) Expand 10 before | Expand all | Expand 10 after
10819 } else { 10816 } else {
10820 value &= ~(1 << bit_position); 10817 value &= ~(1 << bit_position);
10821 } 10818 }
10822 return value; 10819 return value;
10823 } 10820 }
10824 }; 10821 };
10825 10822
10826 } } // namespace v8::internal 10823 } } // namespace v8::internal
10827 10824
10828 #endif // V8_OBJECTS_H_ 10825 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698