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/builtins.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 1628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1639 Object); | 1639 Object); |
1640 } | 1640 } |
1641 | 1641 |
1642 DCHECK(!args[0]->IsNull()); | 1642 DCHECK(!args[0]->IsNull()); |
1643 if (args[0]->IsUndefined()) args[0] = function->global_proxy(); | 1643 if (args[0]->IsUndefined()) args[0] = function->global_proxy(); |
1644 | 1644 |
1645 if (!is_construct && !fun_data->accept_any_receiver()) { | 1645 if (!is_construct && !fun_data->accept_any_receiver()) { |
1646 Handle<Object> receiver(&args[0]); | 1646 Handle<Object> receiver(&args[0]); |
1647 if (receiver->IsJSObject() && receiver->IsAccessCheckNeeded()) { | 1647 if (receiver->IsJSObject() && receiver->IsAccessCheckNeeded()) { |
1648 Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver); | 1648 Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver); |
1649 if (!isolate->MayAccess(js_receiver)) { | 1649 if (!isolate->MayAccess(handle(isolate->context()), js_receiver)) { |
1650 isolate->ReportFailedAccessCheck(js_receiver); | 1650 isolate->ReportFailedAccessCheck(js_receiver); |
1651 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 1651 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
1652 } | 1652 } |
1653 } | 1653 } |
1654 } | 1654 } |
1655 | 1655 |
1656 Object* raw_holder = fun_data->GetCompatibleReceiver(isolate, args[0]); | 1656 Object* raw_holder = fun_data->GetCompatibleReceiver(isolate, args[0]); |
1657 | 1657 |
1658 if (raw_holder->IsNull()) { | 1658 if (raw_holder->IsNull()) { |
1659 // This function cannot be called with the given receiver. Abort! | 1659 // This function cannot be called with the given receiver. Abort! |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2199 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 2199 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
2200 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 2200 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
2201 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 2201 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
2202 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 2202 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
2203 #undef DEFINE_BUILTIN_ACCESSOR_C | 2203 #undef DEFINE_BUILTIN_ACCESSOR_C |
2204 #undef DEFINE_BUILTIN_ACCESSOR_A | 2204 #undef DEFINE_BUILTIN_ACCESSOR_A |
2205 | 2205 |
2206 | 2206 |
2207 } // namespace internal | 2207 } // namespace internal |
2208 } // namespace v8 | 2208 } // namespace v8 |
OLD | NEW |