OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1964 Handle<JSFunction> function = | 1964 Handle<JSFunction> function = |
1965 SimpleCreateFunction(isolate, factory->empty_string(), | 1965 SimpleCreateFunction(isolate, factory->empty_string(), |
1966 Builtins::kPromiseHandleReject, 3, false); | 1966 Builtins::kPromiseHandleReject, 3, false); |
1967 InstallWithIntrinsicDefaultProto(isolate, function, | 1967 InstallWithIntrinsicDefaultProto(isolate, function, |
1968 Context::PROMISE_HANDLE_REJECT_INDEX); | 1968 Context::PROMISE_HANDLE_REJECT_INDEX); |
1969 // Set up catch prediction | 1969 // Set up catch prediction |
1970 Handle<Code> promise_handle = isolate->builtins()->PromiseHandleReject(); | 1970 Handle<Code> promise_handle = isolate->builtins()->PromiseHandleReject(); |
1971 promise_handle->set_is_exception_caught(true); | 1971 promise_handle->set_is_exception_caught(true); |
1972 } | 1972 } |
1973 | 1973 |
| 1974 { // Internal: InternalPromiseReject |
| 1975 Handle<JSFunction> function = |
| 1976 SimpleCreateFunction(isolate, factory->empty_string(), |
| 1977 Builtins::kInternalPromiseReject, 3, true); |
| 1978 InstallWithIntrinsicDefaultProto(isolate, function, |
| 1979 Context::PROMISE_INTERNAL_REJECT_INDEX); |
| 1980 } |
| 1981 |
1974 { | 1982 { |
1975 Handle<Code> code = | 1983 Handle<Code> code = |
1976 handle(isolate->builtins()->builtin(Builtins::kPromiseResolveClosure), | 1984 handle(isolate->builtins()->builtin(Builtins::kPromiseResolveClosure), |
1977 isolate); | 1985 isolate); |
1978 Handle<SharedFunctionInfo> info = | 1986 Handle<SharedFunctionInfo> info = |
1979 factory->NewSharedFunctionInfo(factory->empty_string(), code, false); | 1987 factory->NewSharedFunctionInfo(factory->empty_string(), code, false); |
1980 info->set_internal_formal_parameter_count(1); | 1988 info->set_internal_formal_parameter_count(1); |
1981 info->set_length(1); | 1989 info->set_length(1); |
1982 native_context()->set_promise_resolve_shared_fun(*info); | 1990 native_context()->set_promise_resolve_shared_fun(*info); |
1983 | 1991 |
(...skipping 2778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4762 } | 4770 } |
4763 | 4771 |
4764 | 4772 |
4765 // Called when the top-level V8 mutex is destroyed. | 4773 // Called when the top-level V8 mutex is destroyed. |
4766 void Bootstrapper::FreeThreadResources() { | 4774 void Bootstrapper::FreeThreadResources() { |
4767 DCHECK(!IsActive()); | 4775 DCHECK(!IsActive()); |
4768 } | 4776 } |
4769 | 4777 |
4770 } // namespace internal | 4778 } // namespace internal |
4771 } // namespace v8 | 4779 } // namespace v8 |
OLD | NEW |