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

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: cr comment 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
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2636 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 static const int kElementsOffset = kPropertiesOffset + kPointerSize; 2647 static const int kElementsOffset = kPropertiesOffset + kPointerSize;
2648 static const int kHeaderSize = kElementsOffset + kPointerSize; 2648 static const int kHeaderSize = kElementsOffset + kPointerSize;
2649 2649
2650 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); 2650 STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize);
2651 2651
2652 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { 2652 class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> {
2653 public: 2653 public:
2654 static inline int SizeOf(Map* map, HeapObject* object); 2654 static inline int SizeOf(Map* map, HeapObject* object);
2655 }; 2655 };
2656 2656
2657 Context* GetCreationContext();
2658
2657 // Enqueue change record for Object.observe. May cause GC. 2659 // Enqueue change record for Object.observe. May cause GC.
2658 static void EnqueueChangeRecord(Handle<JSObject> object, 2660 static void EnqueueChangeRecord(Handle<JSObject> object,
2659 const char* type, 2661 const char* type,
2660 Handle<Name> name, 2662 Handle<Name> name,
2661 Handle<Object> old_value); 2663 Handle<Object> old_value);
2662 2664
2663 private: 2665 private:
2664 friend class DictionaryElementsAccessor; 2666 friend class DictionaryElementsAccessor;
2665 friend class JSReceiver; 2667 friend class JSReceiver;
2666 friend class Object; 2668 friend class Object;
(...skipping 8440 matching lines...) Expand 10 before | Expand all | Expand 10 after
11107 } else { 11109 } else {
11108 value &= ~(1 << bit_position); 11110 value &= ~(1 << bit_position);
11109 } 11111 }
11110 return value; 11112 return value;
11111 } 11113 }
11112 }; 11114 };
11113 11115
11114 } } // namespace v8::internal 11116 } } // namespace v8::internal
11115 11117
11116 #endif // V8_OBJECTS_H_ 11118 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/object-observe.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698