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

Side by Side Diff: src/objects.h

Issue 2551763003: v8::Private::ForApi should be context-independent. (Closed)
Patch Set: fix Created 4 years 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 | « src/js/symbol.js ('k') | src/objects-inl.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 9662 matching lines...) Expand 10 before | Expand all | Expand 10 after
9673 9673
9674 // [is_private]: Whether this is a private symbol. Private symbols can only 9674 // [is_private]: Whether this is a private symbol. Private symbols can only
9675 // be used to designate own properties of objects. 9675 // be used to designate own properties of objects.
9676 DECL_BOOLEAN_ACCESSORS(is_private) 9676 DECL_BOOLEAN_ACCESSORS(is_private)
9677 9677
9678 // [is_well_known_symbol]: Whether this is a spec-defined well-known symbol, 9678 // [is_well_known_symbol]: Whether this is a spec-defined well-known symbol,
9679 // or not. Well-known symbols do not throw when an access check fails during 9679 // or not. Well-known symbols do not throw when an access check fails during
9680 // a load. 9680 // a load.
9681 DECL_BOOLEAN_ACCESSORS(is_well_known_symbol) 9681 DECL_BOOLEAN_ACCESSORS(is_well_known_symbol)
9682 9682
9683 // [is_public]: Whether this is a symbol created by Symbol.for. Calling
9684 // Symbol.keyFor on such a symbol simply needs to return the attached name.
9685 DECL_BOOLEAN_ACCESSORS(is_public)
9686
9683 DECLARE_CAST(Symbol) 9687 DECLARE_CAST(Symbol)
9684 9688
9685 // Dispatched behavior. 9689 // Dispatched behavior.
9686 DECLARE_PRINTER(Symbol) 9690 DECLARE_PRINTER(Symbol)
9687 DECLARE_VERIFIER(Symbol) 9691 DECLARE_VERIFIER(Symbol)
9688 9692
9689 // Layout description. 9693 // Layout description.
9690 static const int kNameOffset = Name::kSize; 9694 static const int kNameOffset = Name::kSize;
9691 static const int kFlagsOffset = kNameOffset + kPointerSize; 9695 static const int kFlagsOffset = kNameOffset + kPointerSize;
9692 static const int kSize = kFlagsOffset + kPointerSize; 9696 static const int kSize = kFlagsOffset + kPointerSize;
9693 9697
9694 // Flags layout. 9698 // Flags layout.
9695 static const int kPrivateBit = 0; 9699 static const int kPrivateBit = 0;
9696 static const int kWellKnownSymbolBit = 1; 9700 static const int kWellKnownSymbolBit = 1;
9701 static const int kPublicBit = 2;
9697 9702
9698 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; 9703 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor;
9699 9704
9700 void SymbolShortPrint(std::ostream& os); 9705 void SymbolShortPrint(std::ostream& os);
9701 9706
9702 private: 9707 private:
9703 const char* PrivateSymbolToName() const; 9708 const char* PrivateSymbolToName() const;
9704 9709
9705 #if TRACE_MAPS 9710 #if TRACE_MAPS
9706 friend class Name; // For PrivateSymbolToName. 9711 friend class Name; // For PrivateSymbolToName.
(...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after
11983 } 11988 }
11984 return value; 11989 return value;
11985 } 11990 }
11986 }; 11991 };
11987 11992
11988 11993
11989 } // NOLINT, false-positive due to second-order macros. 11994 } // NOLINT, false-positive due to second-order macros.
11990 } // NOLINT, false-positive due to second-order macros. 11995 } // NOLINT, false-positive due to second-order macros.
11991 11996
11992 #endif // V8_OBJECTS_H_ 11997 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/symbol.js ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698