Chromium Code Reviews| 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/v8.h" | 5 #include "src/v8.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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 993 } | 993 } |
| 994 } | 994 } |
| 995 | 995 |
| 996 DCHECK(j == result_len); | 996 DCHECK(j == result_len); |
| 997 | 997 |
| 998 return *result_array; | 998 return *result_array; |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 | 1001 |
| 1002 // ----------------------------------------------------------------------------- | 1002 // ----------------------------------------------------------------------------- |
| 1003 // Generator and strict mode poison pills | 1003 // Throwers for restricted function properties and strict arguments object |
| 1004 // properties | |
| 1004 | 1005 |
| 1005 | 1006 |
| 1006 BUILTIN(StrictModePoisonPill) { | 1007 BUILTIN(RestrictedFunctionPropertiesThrower) { |
| 1008 HandleScope scope(isolate); | |
| 1009 THROW_NEW_ERROR_RETURN_FAILURE(isolate, | |
| 1010 NewTypeError("restricted_function_properties", | |
| 1011 HandleVector<Object>(NULL, 0))); | |
| 1012 } | |
| 1013 | |
| 1014 | |
| 1015 BUILTIN(RestrictedStrictArgumentsPropertiesThrower) { | |
| 1007 HandleScope scope(isolate); | 1016 HandleScope scope(isolate); |
| 1008 THROW_NEW_ERROR_RETURN_FAILURE( | 1017 THROW_NEW_ERROR_RETURN_FAILURE( |
| 1009 isolate, | 1018 isolate, |
| 1010 NewTypeError("strict_poison_pill", HandleVector<Object>(NULL, 0))); | 1019 NewTypeError("strict_poison_pill", HandleVector<Object>(NULL, 0))); |
|
arv (Not doing code reviews)
2015/04/07 16:18:39
maybe rename the message key now that we renamed t
caitp (gmail)
2015/04/07 16:29:57
Acknowledged.
| |
| 1011 } | 1020 } |
| 1012 | 1021 |
| 1013 | 1022 |
| 1014 BUILTIN(GeneratorPoisonPill) { | |
| 1015 HandleScope scope(isolate); | |
| 1016 THROW_NEW_ERROR_RETURN_FAILURE( | |
| 1017 isolate, | |
| 1018 NewTypeError("generator_poison_pill", HandleVector<Object>(NULL, 0))); | |
| 1019 } | |
| 1020 | |
| 1021 | |
| 1022 // ----------------------------------------------------------------------------- | 1023 // ----------------------------------------------------------------------------- |
| 1023 // | 1024 // |
| 1024 | 1025 |
| 1025 | 1026 |
| 1026 template <bool is_construct> | 1027 template <bool is_construct> |
| 1027 MUST_USE_RESULT static MaybeHandle<Object> HandleApiCallHelper( | 1028 MUST_USE_RESULT static MaybeHandle<Object> HandleApiCallHelper( |
| 1028 Isolate* isolate, BuiltinArguments<NEEDS_CALLED_FUNCTION>& args) { | 1029 Isolate* isolate, BuiltinArguments<NEEDS_CALLED_FUNCTION>& args) { |
| 1029 HandleScope scope(isolate); | 1030 HandleScope scope(isolate); |
| 1030 Handle<JSFunction> function = args.called_function(); | 1031 Handle<JSFunction> function = args.called_function(); |
| 1031 // TODO(ishell): turn this back to a DCHECK. | 1032 // TODO(ishell): turn this back to a DCHECK. |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1651 } | 1652 } |
| 1652 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) | 1653 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) |
| 1653 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) | 1654 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1654 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 1655 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
| 1655 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 1656 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
| 1656 #undef DEFINE_BUILTIN_ACCESSOR_C | 1657 #undef DEFINE_BUILTIN_ACCESSOR_C |
| 1657 #undef DEFINE_BUILTIN_ACCESSOR_A | 1658 #undef DEFINE_BUILTIN_ACCESSOR_A |
| 1658 | 1659 |
| 1659 | 1660 |
| 1660 } } // namespace v8::internal | 1661 } } // namespace v8::internal |
| OLD | NEW |