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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 772 } |
773 | 773 |
774 // Leaving JavaScript. | 774 // Leaving JavaScript. |
775 VMState<EXTERNAL> state(this); | 775 VMState<EXTERNAL> state(this); |
776 thread_local_top()->failed_access_check_callback_( | 776 thread_local_top()->failed_access_check_callback_( |
777 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); | 777 v8::Utils::ToLocal(receiver), v8::ACCESS_HAS, v8::Utils::ToLocal(data)); |
778 } | 778 } |
779 | 779 |
780 | 780 |
781 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { | 781 bool Isolate::IsInternallyUsedPropertyName(Handle<Object> name) { |
| 782 if (name->IsSymbol()) { |
| 783 return Handle<Symbol>::cast(name)->is_private() && |
| 784 Handle<Symbol>::cast(name)->is_own(); |
| 785 } |
782 return name.is_identical_to(factory()->hidden_string()); | 786 return name.is_identical_to(factory()->hidden_string()); |
783 } | 787 } |
784 | 788 |
785 | 789 |
786 bool Isolate::IsInternallyUsedPropertyName(Object* name) { | 790 bool Isolate::IsInternallyUsedPropertyName(Object* name) { |
| 791 if (name->IsSymbol()) { |
| 792 return Symbol::cast(name)->is_private() && Symbol::cast(name)->is_own(); |
| 793 } |
787 return name == heap()->hidden_string(); | 794 return name == heap()->hidden_string(); |
788 } | 795 } |
789 | 796 |
790 | 797 |
791 bool Isolate::MayAccess(Handle<JSObject> receiver) { | 798 bool Isolate::MayAccess(Handle<JSObject> receiver) { |
792 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); | 799 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); |
793 | 800 |
794 // Check for compatibility between the security tokens in the | 801 // Check for compatibility between the security tokens in the |
795 // current lexical context and the accessed object. | 802 // current lexical context and the accessed object. |
796 DCHECK(context()); | 803 DCHECK(context()); |
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 if (prev_ && prev_->Intercept(flag)) return true; | 2785 if (prev_ && prev_->Intercept(flag)) return true; |
2779 // Then check whether this scope intercepts. | 2786 // Then check whether this scope intercepts. |
2780 if ((flag & intercept_mask_)) { | 2787 if ((flag & intercept_mask_)) { |
2781 intercepted_flags_ |= flag; | 2788 intercepted_flags_ |= flag; |
2782 return true; | 2789 return true; |
2783 } | 2790 } |
2784 return false; | 2791 return false; |
2785 } | 2792 } |
2786 | 2793 |
2787 } } // namespace v8::internal | 2794 } } // namespace v8::internal |
OLD | NEW |