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

Unified Diff: src/objects.h

Issue 11347037: Object.observe: generate change records for named properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 0d1a69cb9882985fa282c4e2f3dc4a5fa98c9523..cbc40ba3e1383b0d9b7d5141263e5d9e90d0c3b1 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2276,6 +2276,8 @@ class JSObject: public JSReceiver {
MUST_USE_RESULT MaybeObject* SetHiddenPropertiesHashTable(
Object* value);
+ void NotifyObservers(const char* type, String* name, Object* oldValue);
rafaelw 2012/10/31 14:44:31 suggestion: the name "NotifyObservers" is a bit mi
rafaelw 2012/10/31 17:27:24 also, are arguments unix_hacker style?
Toon Verwaest 2012/11/05 13:33:22 Yes, use old_value in the C++ code. Also in other
rossberg 2012/11/05 17:11:08 Done.
rossberg 2012/11/05 17:11:08 Done.
rossberg 2012/11/05 17:11:08 Done.
+
DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject);
};
@@ -4701,6 +4703,7 @@ class Map: public HeapObject {
class FunctionWithPrototype: public BitField<bool, 23, 1> {};
class DictionaryMap: public BitField<bool, 24, 1> {};
class OwnsDescriptors: public BitField<bool, 25, 1> {};
+ class IsObserved: public BitField<bool, 26, 1> {};
// Tells whether the object in the prototype property will be used
// for instances created from this function. If the prototype
@@ -4968,6 +4971,8 @@ class Map: public HeapObject {
inline bool owns_descriptors();
inline void set_owns_descriptors(bool is_shared);
+ inline bool is_observed();
+ inline void set_is_observed(bool is_observed);
MUST_USE_RESULT MaybeObject* RawCopy(int instance_size);
MUST_USE_RESULT MaybeObject* CopyWithPreallocatedFieldDescriptors();

Powered by Google App Engine
This is Rietveld 408576698