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

Side by Side Diff: src/objects.h

Issue 10388047: Implement correct checking for inherited readonliness on assignment. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ported to x64 & ARM. Created 8 years, 7 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
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 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2148 bool check_prototype, 2148 bool check_prototype,
2149 SetPropertyMode set_mode); 2149 SetPropertyMode set_mode);
2150 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor( 2150 MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor(
2151 uint32_t index, 2151 uint32_t index,
2152 Object* value, 2152 Object* value,
2153 PropertyAttributes attributes, 2153 PropertyAttributes attributes,
2154 StrictModeFlag strict_mode, 2154 StrictModeFlag strict_mode,
2155 bool check_prototype, 2155 bool check_prototype,
2156 SetPropertyMode set_mode); 2156 SetPropertyMode set_mode);
2157 2157
2158 // Searches the prototype chain for a callback setter and sets the property 2158 // Searches the prototype chain for property 'name'. If it is found and
2159 // with the setter if it finds one. The '*found' flag indicates whether 2159 // has a setter, invoke it and set '*done' to true. If it is found and is
2160 // a setter was found or not. 2160 // read-only, reject and set '*done' to true. Otherwise, set '*done' to
2161 // This function can cause GC and can return a failure result with 2161 // false. Can cause GC and can return a failure result with '*done==true'.
2162 // '*found==true'. 2162 MUST_USE_RESULT MaybeObject* SetPropertyViaPrototypes(
2163 MUST_USE_RESULT MaybeObject* SetPropertyWithCallbackSetterInPrototypes(
2164 String* name, 2163 String* name,
2165 Object* value, 2164 Object* value,
2166 PropertyAttributes attributes, 2165 PropertyAttributes attributes,
2167 bool* found, 2166 StrictModeFlag strict_mode,
2168 StrictModeFlag strict_mode); 2167 bool* done);
2169 2168
2170 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name, 2169 MUST_USE_RESULT MaybeObject* DeletePropertyPostInterceptor(String* name,
2171 DeleteMode mode); 2170 DeleteMode mode);
2172 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name); 2171 MUST_USE_RESULT MaybeObject* DeletePropertyWithInterceptor(String* name);
2173 2172
2174 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index); 2173 MUST_USE_RESULT MaybeObject* DeleteElementWithInterceptor(uint32_t index);
2175 2174
2176 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index); 2175 MUST_USE_RESULT MaybeObject* DeleteFastElement(uint32_t index);
2177 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index, 2176 MUST_USE_RESULT MaybeObject* DeleteDictionaryElement(uint32_t index,
2178 DeleteMode mode); 2177 DeleteMode mode);
(...skipping 5542 matching lines...) Expand 10 before | Expand all | Expand 10 after
7721 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler( 7720 MUST_USE_RESULT MaybeObject* SetPropertyWithHandler(
7722 String* name, 7721 String* name,
7723 Object* value, 7722 Object* value,
7724 PropertyAttributes attributes, 7723 PropertyAttributes attributes,
7725 StrictModeFlag strict_mode); 7724 StrictModeFlag strict_mode);
7726 MUST_USE_RESULT MaybeObject* SetElementWithHandler( 7725 MUST_USE_RESULT MaybeObject* SetElementWithHandler(
7727 uint32_t index, 7726 uint32_t index,
7728 Object* value, 7727 Object* value,
7729 StrictModeFlag strict_mode); 7728 StrictModeFlag strict_mode);
7730 7729
7731 // If the handler defines an accessor property, invoke its setter 7730 // If the handler defines an accessor property with a setter, invoke it.
7732 // (or throw if only a getter exists) and set *found to true. Otherwise false. 7731 // If it defines an accessor property without a setter, or a data property
7733 MUST_USE_RESULT MaybeObject* SetPropertyWithHandlerIfDefiningSetter( 7732 // that is read-only, throw. In all these cases set '*done' to true,
7733 // otherwise set it to false.
7734 MUST_USE_RESULT MaybeObject* SetPropertyViaPrototypesWithHandler(
7735 JSObject* receiver,
7734 String* name, 7736 String* name,
7735 Object* value, 7737 Object* value,
7736 PropertyAttributes attributes, 7738 PropertyAttributes attributes,
7737 StrictModeFlag strict_mode, 7739 StrictModeFlag strict_mode,
7738 bool* found); 7740 bool* done);
7739 7741
7740 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( 7742 MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler(
7741 String* name, 7743 String* name,
7742 DeleteMode mode); 7744 DeleteMode mode);
7743 MUST_USE_RESULT MaybeObject* DeleteElementWithHandler( 7745 MUST_USE_RESULT MaybeObject* DeleteElementWithHandler(
7744 uint32_t index, 7746 uint32_t index,
7745 DeleteMode mode); 7747 DeleteMode mode);
7746 7748
7747 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( 7749 MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler(
7748 JSReceiver* receiver, 7750 JSReceiver* receiver,
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
8660 } else { 8662 } else {
8661 value &= ~(1 << bit_position); 8663 value &= ~(1 << bit_position);
8662 } 8664 }
8663 return value; 8665 return value;
8664 } 8666 }
8665 }; 8667 };
8666 8668
8667 } } // namespace v8::internal 8669 } } // namespace v8::internal
8668 8670
8669 #endif // V8_OBJECTS_H_ 8671 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698