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

Side by Side Diff: include/v8.h

Issue 88026: Added ForceSet on objects (Closed)
Patch Set: Added docs for ForceSet Created 11 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/objects.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 }; 1038 };
1039 1039
1040 /** 1040 /**
1041 * A JavaScript object (ECMA-262, 4.3.3) 1041 * A JavaScript object (ECMA-262, 4.3.3)
1042 */ 1042 */
1043 class V8EXPORT Object : public Value { 1043 class V8EXPORT Object : public Value {
1044 public: 1044 public:
1045 bool Set(Handle<Value> key, 1045 bool Set(Handle<Value> key,
1046 Handle<Value> value, 1046 Handle<Value> value,
1047 PropertyAttribute attribs = None); 1047 PropertyAttribute attribs = None);
1048
1049 // Sets a local property on this object, bypassing interceptors and
Mads Ager (chromium) 2009/04/21 13:24:16 For now this only forces the set for string keys,
1050 // overriding accessors or read-only properties.
1051 //
1052 // Note that if the object has an interceptor the property will be set
1053 // locally, but since the interceptor takes precedence the local property
1054 // will only be returned if the interceptor doesn't return a value.
1055 bool ForceSet(Handle<Value> key,
1056 Handle<Value> value,
1057 PropertyAttribute attribs = None);
1048 Local<Value> Get(Handle<Value> key); 1058 Local<Value> Get(Handle<Value> key);
1049 1059
1050 // TODO(1245389): Replace the type-specific versions of these 1060 // TODO(1245389): Replace the type-specific versions of these
1051 // functions with generic ones that accept a Handle<Value> key. 1061 // functions with generic ones that accept a Handle<Value> key.
1052 bool Has(Handle<String> key); 1062 bool Has(Handle<String> key);
1053 bool Delete(Handle<String> key); 1063 bool Delete(Handle<String> key);
1054 bool Has(uint32_t index); 1064 bool Has(uint32_t index);
1055 bool Delete(uint32_t index); 1065 bool Delete(uint32_t index);
1056 1066
1057 /** 1067 /**
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2546 2556
2547 } // namespace v8 2557 } // namespace v8
2548 2558
2549 2559
2550 #undef V8EXPORT 2560 #undef V8EXPORT
2551 #undef V8EXPORT_INLINE 2561 #undef V8EXPORT_INLINE
2552 #undef TYPE_CHECK 2562 #undef TYPE_CHECK
2553 2563
2554 2564
2555 #endif // V8_H_ 2565 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698