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 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 DCHECK(!args[0]->IsNull()); | 1705 DCHECK(!args[0]->IsNull()); |
1706 if (args[0]->IsUndefined()) args[0] = function->global_proxy(); | 1706 if (args[0]->IsUndefined()) args[0] = function->global_proxy(); |
1707 | 1707 |
1708 if (!is_construct && !fun_data->accept_any_receiver()) { | 1708 if (!is_construct && !fun_data->accept_any_receiver()) { |
1709 Handle<Object> receiver(&args[0]); | 1709 Handle<Object> receiver(&args[0]); |
1710 if (receiver->IsJSObject() && receiver->IsAccessCheckNeeded()) { | 1710 if (receiver->IsJSObject() && receiver->IsAccessCheckNeeded()) { |
1711 Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver); | 1711 Handle<JSObject> js_receiver = Handle<JSObject>::cast(receiver); |
1712 if (!isolate->MayAccess(handle(isolate->context()), js_receiver)) { | 1712 if (!isolate->MayAccess(handle(isolate->context()), js_receiver)) { |
1713 isolate->ReportFailedAccessCheck(js_receiver); | 1713 isolate->ReportFailedAccessCheck(js_receiver); |
1714 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); | 1714 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
1715 UNREACHABLE(); | |
1716 } | 1715 } |
1717 } | 1716 } |
1718 } | 1717 } |
1719 | 1718 |
1720 Object* raw_holder = fun_data->GetCompatibleReceiver(isolate, args[0]); | 1719 Object* raw_holder = fun_data->GetCompatibleReceiver(isolate, args[0]); |
1721 | 1720 |
1722 if (raw_holder->IsNull()) { | 1721 if (raw_holder->IsNull()) { |
1723 // This function cannot be called with the given receiver. Abort! | 1722 // This function cannot be called with the given receiver. Abort! |
1724 THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIllegalInvocation), | 1723 THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kIllegalInvocation), |
1725 Object); | 1724 Object); |
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2266 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 2265 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
2267 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 2266 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
2268 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 2267 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
2269 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 2268 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
2270 #undef DEFINE_BUILTIN_ACCESSOR_C | 2269 #undef DEFINE_BUILTIN_ACCESSOR_C |
2271 #undef DEFINE_BUILTIN_ACCESSOR_A | 2270 #undef DEFINE_BUILTIN_ACCESSOR_A |
2272 | 2271 |
2273 | 2272 |
2274 } // namespace internal | 2273 } // namespace internal |
2275 } // namespace v8 | 2274 } // namespace v8 |
OLD | NEW |