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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 data = handle(access_check_info->data(), this); | 775 data = handle(access_check_info->data(), this); |
776 } | 776 } |
777 | 777 |
778 // Leaving JavaScript. | 778 // Leaving JavaScript. |
779 VMState<EXTERNAL> state(this); | 779 VMState<EXTERNAL> state(this); |
780 thread_local_top()->failed_access_check_callback_( | 780 thread_local_top()->failed_access_check_callback_( |
781 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); | 781 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); |
782 } | 782 } |
783 | 783 |
784 | 784 |
785 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { | |
786 if (name->IsSymbol()) { | |
787 return Handle<Symbol>::cast(name)->is_private(); | |
788 } | |
789 return name.is_identical_to(factory()->hidden_string()); | |
790 } | |
791 | |
792 | |
793 bool Isolate::MayAccess(Handle<Context> accessing_context, | 785 bool Isolate::MayAccess(Handle<Context> accessing_context, |
794 Handle<JSObject> receiver) { | 786 Handle<JSObject> receiver) { |
795 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); | 787 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); |
796 | 788 |
797 // Check for compatibility between the security tokens in the | 789 // Check for compatibility between the security tokens in the |
798 // current lexical context and the accessed object. | 790 // current lexical context and the accessed object. |
799 | 791 |
800 // During bootstrapping, callback functions are not enabled yet. | 792 // During bootstrapping, callback functions are not enabled yet. |
801 if (bootstrapper()->IsActive()) return true; | 793 if (bootstrapper()->IsActive()) return true; |
802 { | 794 { |
(...skipping 2062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2865 // Then check whether this scope intercepts. | 2857 // Then check whether this scope intercepts. |
2866 if ((flag & intercept_mask_)) { | 2858 if ((flag & intercept_mask_)) { |
2867 intercepted_flags_ |= flag; | 2859 intercepted_flags_ |= flag; |
2868 return true; | 2860 return true; |
2869 } | 2861 } |
2870 return false; | 2862 return false; |
2871 } | 2863 } |
2872 | 2864 |
2873 } // namespace internal | 2865 } // namespace internal |
2874 } // namespace v8 | 2866 } // namespace v8 |
OLD | NEW |