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

Side by Side Diff: src/objects.h

Issue 265503002: Re-enable Object.observe and add enforcement for security invariants. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cleanup Created 6 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include "allocation.h" 8 #include "allocation.h"
9 #include "assert-scope.h" 9 #include "assert-scope.h"
10 #include "builtins.h" 10 #include "builtins.h"
(...skipping 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after
2735 static const int kElementsOffset = kPropertiesOffset + kPointerSize; 2735 static const int kElementsOffset = kPropertiesOffset + kPointerSize;
2736 static const int kHeaderSize = kElementsOffset + kPointerSize; 2736 static const int kHeaderSize = kElementsOffset + kPointerSize;
2737 2737
2738 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); 2738 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize);
2739 2739
2740 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { 2740 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> {
2741 public: 2741 public:
2742 static inline int SizeOf(Map* map, HeapObject* object); 2742 static inline int SizeOf(Map* map, HeapObject* object);
2743 }; 2743 };
2744 2744
2745 Context* GetCreationContext();
2746
2745 // Enqueue change record for Object.observe. May cause GC. 2747 // Enqueue change record for Object.observe. May cause GC.
2746 static void EnqueueChangeRecord(Handle<JSObject> object, 2748 static void EnqueueChangeRecord(Handle<JSObject> object,
2747 const char* type, 2749 const char* type,
2748 Handle<Name> name, 2750 Handle<Name> name,
2749 Handle<Object> old_value); 2751 Handle<Object> old_value);
2750 2752
2751 private: 2753 private:
2752 friend class DictionaryElementsAccessor; 2754 friend class DictionaryElementsAccessor;
2753 friend class JSReceiver; 2755 friend class JSReceiver;
2754 friend class Object; 2756 friend class Object;
(...skipping 8415 matching lines...) Expand 10 before | Expand all | Expand 10 after
11170 } else { 11172 } else {
11171 value &= ~(1 << bit_position); 11173 value &= ~(1 << bit_position);
11172 } 11174 }
11173 return value; 11175 return value;
11174 } 11176 }
11175 }; 11177 };
11176 11178
11177 } } // namespace v8::internal 11179 } } // namespace v8::internal
11178 11180
11179 #endif // V8_OBJECTS_H_ 11181 #endif // V8_OBJECTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698