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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 } | 772 } |
773 | 773 |
774 | 774 |
775 bool Isolate::MayAccess(Handle<Context> accessing_context, | 775 bool Isolate::MayAccess(Handle<Context> accessing_context, |
776 Handle<JSObject> receiver) { | 776 Handle<JSObject> receiver) { |
777 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); | 777 DCHECK(receiver->IsJSGlobalProxy() || receiver->IsAccessCheckNeeded()); |
778 | 778 |
779 // Check for compatibility between the security tokens in the | 779 // Check for compatibility between the security tokens in the |
780 // current lexical context and the accessed object. | 780 // current lexical context and the accessed object. |
781 | 781 |
| 782 // During bootstrapping, callback functions are not enabled yet. |
| 783 if (bootstrapper()->IsActive()) return true; |
782 { | 784 { |
783 DisallowHeapAllocation no_gc; | 785 DisallowHeapAllocation no_gc; |
784 // During bootstrapping, callback functions are not enabled yet. | |
785 if (bootstrapper()->IsActive()) return true; | |
786 | 786 |
787 if (receiver->IsJSGlobalProxy()) { | 787 if (receiver->IsJSGlobalProxy()) { |
788 Object* receiver_context = | 788 Object* receiver_context = |
789 JSGlobalProxy::cast(*receiver)->native_context(); | 789 JSGlobalProxy::cast(*receiver)->native_context(); |
790 if (!receiver_context->IsContext()) return false; | 790 if (!receiver_context->IsContext()) return false; |
791 | 791 |
792 // Get the native context of current top context. | 792 // Get the native context of current top context. |
793 // avoid using Isolate::native_context() because it uses Handle. | 793 // avoid using Isolate::native_context() because it uses Handle. |
794 Context* native_context = | 794 Context* native_context = |
795 accessing_context->global_object()->native_context(); | 795 accessing_context->global_object()->native_context(); |
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2809 // Then check whether this scope intercepts. | 2809 // Then check whether this scope intercepts. |
2810 if ((flag & intercept_mask_)) { | 2810 if ((flag & intercept_mask_)) { |
2811 intercepted_flags_ |= flag; | 2811 intercepted_flags_ |= flag; |
2812 return true; | 2812 return true; |
2813 } | 2813 } |
2814 return false; | 2814 return false; |
2815 } | 2815 } |
2816 | 2816 |
2817 } // namespace internal | 2817 } // namespace internal |
2818 } // namespace v8 | 2818 } // namespace v8 |
OLD | NEW |