| OLD | NEW |
| 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 #include "src/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 | 765 |
| 766 | 766 |
| 767 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { | 767 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { |
| 768 if (name->IsSymbol()) { | 768 if (name->IsSymbol()) { |
| 769 return Handle<Symbol>::cast(name)->is_private(); | 769 return Handle<Symbol>::cast(name)->is_private(); |
| 770 } | 770 } |
| 771 return name.is_identical_to(factory()->hidden_string()); | 771 return name.is_identical_to(factory()->hidden_string()); |
| 772 } | 772 } |
| 773 | 773 |
| 774 | 774 |
| 775 bool Isolate::IsInternallyUsedPropertyName(Object* name) { | |
| 776 if (name->IsSymbol()) { | |
| 777 return Symbol::cast(name)->is_private(); | |
| 778 } | |
| 779 return name == heap()->hidden_string(); | |
| 780 } | |
| 781 | |
| 782 | |
| 783 bool Isolate::MayAccess(Handle<Context> accessing_context, | 775 bool Isolate::MayAccess(Handle<Context> accessing_context, |
| 784 Handle<JSObject> receiver) { | 776 Handle<JSObject> receiver) { |
| 785 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); | 777 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); |
| 786 | 778 |
| 787 // Check for compatibility between the security tokens in the | 779 // Check for compatibility between the security tokens in the |
| 788 // current lexical context and the accessed object. | 780 // current lexical context and the accessed object. |
| 789 | 781 |
| 790 { | 782 { |
| 791 DisallowHeapAllocation no_gc; | 783 DisallowHeapAllocation no_gc; |
| 792 // During bootstrapping, callback functions are not enabled yet. | 784 // During bootstrapping, callback functions are not enabled yet. |
| (...skipping 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2838 // Then check whether this scope intercepts. | 2830 // Then check whether this scope intercepts. |
| 2839 if ((flag & intercept_mask_)) { | 2831 if ((flag & intercept_mask_)) { |
| 2840 intercepted_flags_ |= flag; | 2832 intercepted_flags_ |= flag; |
| 2841 return true; | 2833 return true; |
| 2842 } | 2834 } |
| 2843 return false; | 2835 return false; |
| 2844 } | 2836 } |
| 2845 | 2837 |
| 2846 } // namespace internal | 2838 } // namespace internal |
| 2847 } // namespace v8 | 2839 } // namespace v8 |
| OLD | NEW |