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

Side by Side Diff: src/objects.h

Issue 6101001: Don't let JSON parsed objects hit inherited setters. (Closed)
Patch Set: Address review comments. Created 9 years, 11 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 | « src/heap-inl.h ('k') | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1498
1499 // Element with given index is stored in slow backing store. 1499 // Element with given index is stored in slow backing store.
1500 DICTIONARY_ELEMENT 1500 DICTIONARY_ELEMENT
1501 }; 1501 };
1502 1502
1503 LocalElementType HasLocalElement(uint32_t index); 1503 LocalElementType HasLocalElement(uint32_t index);
1504 1504
1505 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index); 1505 bool HasElementWithInterceptor(JSObject* receiver, uint32_t index);
1506 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index); 1506 bool HasElementPostInterceptor(JSObject* receiver, uint32_t index);
1507 1507
1508 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index, Object* value); 1508 MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index,
1509 Object* value,
1510 bool check_prototype = true);
1509 1511
1510 // Set the index'th array element. 1512 // Set the index'th array element.
1511 // A Failure object is returned if GC is needed. 1513 // A Failure object is returned if GC is needed.
1512 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, Object* value); 1514 MUST_USE_RESULT MaybeObject* SetElement(uint32_t index,
1515 Object* value,
1516 bool check_prototype = true);
1513 1517
1514 // Returns the index'th element. 1518 // Returns the index'th element.
1515 // The undefined object if index is out of bounds. 1519 // The undefined object if index is out of bounds.
1516 MaybeObject* GetElementWithReceiver(JSObject* receiver, uint32_t index); 1520 MaybeObject* GetElementWithReceiver(JSObject* receiver, uint32_t index);
1517 MaybeObject* GetElementWithInterceptor(JSObject* receiver, uint32_t index); 1521 MaybeObject* GetElementWithInterceptor(JSObject* receiver, uint32_t index);
1518 1522
1519 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity, 1523 MUST_USE_RESULT MaybeObject* SetFastElementsCapacityAndLength(int capacity,
1520 int length); 1524 int length);
1521 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length); 1525 MUST_USE_RESULT MaybeObject* SetSlowElements(Object* length);
1522 1526
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1756 private: 1760 private:
1757 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver, 1761 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver,
1758 Object* structure, 1762 Object* structure,
1759 uint32_t index, 1763 uint32_t index,
1760 Object* holder); 1764 Object* holder);
1761 MaybeObject* SetElementWithCallback(Object* structure, 1765 MaybeObject* SetElementWithCallback(Object* structure,
1762 uint32_t index, 1766 uint32_t index,
1763 Object* value, 1767 Object* value,
1764 JSObject* holder); 1768 JSObject* holder);
1765 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index, 1769 MUST_USE_RESULT MaybeObject* SetElementWithInterceptor(uint32_t index,
1766 Object* value); 1770 Object* value,
1767 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(uint32_t index, 1771 bool check_prototype);
1768 Object* value); 1772 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(
1773 uint32_t index,
1774 Object* value,
1775 bool check_prototype);
1769 1776
1770 MaybeObject* GetElementPostInterceptor(JSObject* receiver, uint32_t index); 1777 MaybeObject* GetElementPostInterceptor(JSObject* receiver, uint32_t index);
1771 1778
1772 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, 1779 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name,
1773 DeleteMode mode); 1780 DeleteMode mode);
1774 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); 1781 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name);
1775 1782
1776 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index, 1783 MUST_USE_RESULT MaybeObject* DeleteElementPostInterceptor(uint32_t index,
1777 DeleteMode mode); 1784 DeleteMode mode);
1778 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); 1785 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index);
(...skipping 4603 matching lines...) Expand 10 before | Expand all | Expand 10 after
6382 } else { 6389 } else {
6383 value &= ~(1 << bit_position); 6390 value &= ~(1 << bit_position);
6384 } 6391 }
6385 return value; 6392 return value;
6386 } 6393 }
6387 }; 6394 };
6388 6395
6389 } } // namespace v8::internal 6396 } } // namespace v8::internal
6390 6397
6391 #endif // V8_OBJECTS_H_ 6398 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap-inl.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698