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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include <fstream> // NOLINT(readability/streams) | 7 #include <fstream> // NOLINT(readability/streams) |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/v8.h" | 10 #include "src/v8.h" |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 | 767 |
768 // Leaving JavaScript. | 768 // Leaving JavaScript. |
769 VMState<EXTERNAL> state(this); | 769 VMState<EXTERNAL> state(this); |
770 thread_local_top()->failed_access_check_callback_( | 770 thread_local_top()->failed_access_check_callback_( |
771 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); | 771 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); |
772 } | 772 } |
773 | 773 |
774 | 774 |
775 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { | 775 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { |
776 if (name->IsSymbol()) { | 776 if (name->IsSymbol()) { |
777 return Handle<Symbol>::cast(name)->is_private() && | 777 return Handle<Symbol>::cast(name)->is_private(); |
778 Handle<Symbol>::cast(name)->is_own(); | |
779 } | 778 } |
780 return name.is_identical_to(factory()->hidden_string()); | 779 return name.is_identical_to(factory()->hidden_string()); |
781 } | 780 } |
782 | 781 |
783 | 782 |
784 bool Isolate::IsInternallyUsedPropertyName(Object* name) { | 783 bool Isolate::IsInternallyUsedPropertyName(Object* name) { |
785 if (name->IsSymbol()) { | 784 if (name->IsSymbol()) { |
786 return Symbol::cast(name)->is_private() && Symbol::cast(name)->is_own(); | 785 return Symbol::cast(name)->is_private(); |
787 } | 786 } |
788 return name == heap()->hidden_string(); | 787 return name == heap()->hidden_string(); |
789 } | 788 } |
790 | 789 |
791 | 790 |
792 bool Isolate::MayAccess(Handle<JSObject> receiver) { | 791 bool Isolate::MayAccess(Handle<JSObject> receiver) { |
793 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); | 792 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); |
794 | 793 |
795 // Check for compatibility between the security tokens in the | 794 // Check for compatibility between the security tokens in the |
796 // current lexical context and the accessed object. | 795 // current lexical context and the accessed object. |
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2802 // Then check whether this scope intercepts. | 2801 // Then check whether this scope intercepts. |
2803 if ((flag & intercept_mask_)) { | 2802 if ((flag & intercept_mask_)) { |
2804 intercepted_flags_ |= flag; | 2803 intercepted_flags_ |= flag; |
2805 return true; | 2804 return true; |
2806 } | 2805 } |
2807 return false; | 2806 return false; |
2808 } | 2807 } |
2809 | 2808 |
2810 } // namespace internal | 2809 } // namespace internal |
2811 } // namespace v8 | 2810 } // namespace v8 |
OLD | NEW |