OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 // Get the data object from access check info. | 768 // Get the data object from access check info. |
769 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); | 769 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor()); |
770 if (!constructor->shared()->IsApiFunction()) return; | 770 if (!constructor->shared()->IsApiFunction()) return; |
771 Object* data_obj = | 771 Object* data_obj = |
772 constructor->shared()->get_api_func_data()->access_check_info(); | 772 constructor->shared()->get_api_func_data()->access_check_info(); |
773 if (data_obj == heap_.undefined_value()) return; | 773 if (data_obj == heap_.undefined_value()) return; |
774 | 774 |
775 HandleScope scope; | 775 HandleScope scope; |
776 Handle<JSObject> receiver_handle(receiver); | 776 Handle<JSObject> receiver_handle(receiver); |
777 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data()); | 777 Handle<Object> data(AccessCheckInfo::cast(data_obj)->data()); |
778 thread_local_top()->failed_access_check_callback_( | 778 { VMState state(this, EXTERNAL); |
779 v8::Utils::ToLocal(receiver_handle), | 779 thread_local_top()->failed_access_check_callback_( |
780 type, | 780 v8::Utils::ToLocal(receiver_handle), |
781 v8::Utils::ToLocal(data)); | 781 type, |
| 782 v8::Utils::ToLocal(data)); |
| 783 } |
782 } | 784 } |
783 | 785 |
784 | 786 |
785 enum MayAccessDecision { | 787 enum MayAccessDecision { |
786 YES, NO, UNKNOWN | 788 YES, NO, UNKNOWN |
787 }; | 789 }; |
788 | 790 |
789 | 791 |
790 static MayAccessDecision MayAccessPreCheck(Isolate* isolate, | 792 static MayAccessDecision MayAccessPreCheck(Isolate* isolate, |
791 JSObject* receiver, | 793 JSObject* receiver, |
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1950 | 1952 |
1951 #ifdef DEBUG | 1953 #ifdef DEBUG |
1952 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1954 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1953 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1955 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
1954 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1956 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1955 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1957 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1956 #undef ISOLATE_FIELD_OFFSET | 1958 #undef ISOLATE_FIELD_OFFSET |
1957 #endif | 1959 #endif |
1958 | 1960 |
1959 } } // namespace v8::internal | 1961 } } // namespace v8::internal |
OLD | NEW |