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

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: throw on Observe or getNotifier with global object 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 2634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 static const int kElementsOffset = kPropertiesOffset + kPointerSize; 2645 static const int kElementsOffset = kPropertiesOffset + kPointerSize;
2646 static const int kHeaderSize = kElementsOffset + kPointerSize; 2646 static const int kHeaderSize = kElementsOffset + kPointerSize;
2647 2647
2648 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); 2648 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize);
2649 2649
2650 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { 2650 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> {
2651 public: 2651 public:
2652 static inline int SizeOf(Map* map, HeapObject* object); 2652 static inline int SizeOf(Map* map, HeapObject* object);
2653 }; 2653 };
2654 2654
2655 Context* GetCreationContext();
2656
2655 // Enqueue change record for Object.observe. May cause GC. 2657 // Enqueue change record for Object.observe. May cause GC.
2656 static void EnqueueChangeRecord(Handle<JSObject> object, 2658 static void EnqueueChangeRecord(Handle<JSObject> object,
2657 const char* type, 2659 const char* type,
2658 Handle<Name> name, 2660 Handle<Name> name,
2659 Handle<Object> old_value); 2661 Handle<Object> old_value);
2660 2662
2661 private: 2663 private:
2662 friend class DictionaryElementsAccessor; 2664 friend class DictionaryElementsAccessor;
2663 friend class JSReceiver; 2665 friend class JSReceiver;
2664 friend class Object; 2666 friend class Object;
(...skipping 8429 matching lines...) Expand 10 before | Expand all | Expand 10 after
11094 } else { 11096 } else {
11095 value &= ~(1 << bit_position); 11097 value &= ~(1 << bit_position);
11096 } 11098 }
11097 return value; 11099 return value;
11098 } 11100 }
11099 }; 11101 };
11100 11102
11101 } } // namespace v8::internal 11103 } } // namespace v8::internal
11102 11104
11103 #endif // V8_OBJECTS_H_ 11105 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698