| 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 1897 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1908     } | 1908     } | 
| 1909 | 1909 | 
| 1910     {  // Internal: ResolvePromise | 1910     {  // Internal: ResolvePromise | 
| 1911       Handle<JSFunction> function = | 1911       Handle<JSFunction> function = | 
| 1912           SimpleCreateFunction(isolate, factory->empty_string(), | 1912           SimpleCreateFunction(isolate, factory->empty_string(), | 
| 1913                                Builtins::kResolvePromise, 2, false); | 1913                                Builtins::kResolvePromise, 2, false); | 
| 1914       InstallWithIntrinsicDefaultProto(isolate, function, | 1914       InstallWithIntrinsicDefaultProto(isolate, function, | 
| 1915                                        Context::PROMISE_RESOLVE_INDEX); | 1915                                        Context::PROMISE_RESOLVE_INDEX); | 
| 1916     } | 1916     } | 
| 1917 | 1917 | 
|  | 1918     {  // Internal: PromiseHandle | 
|  | 1919       Handle<JSFunction> function = SimpleCreateFunction( | 
|  | 1920           isolate, factory->empty_string(), Builtins::kPromiseHandle, 3, true); | 
|  | 1921       InstallWithIntrinsicDefaultProto(isolate, function, | 
|  | 1922                                        Context::PROMISE_HANDLE_INDEX); | 
|  | 1923       // Set up catch prediction | 
|  | 1924       Handle<Code> promise_handle = isolate->builtins()->PromiseHandle(); | 
|  | 1925       promise_handle->set_is_promise_rejection(true); | 
|  | 1926     } | 
|  | 1927 | 
|  | 1928     {  // Internal: PromiseHandleReject | 
|  | 1929       Handle<JSFunction> function = | 
|  | 1930           SimpleCreateFunction(isolate, factory->empty_string(), | 
|  | 1931                                Builtins::kPromiseHandleReject, 3, false); | 
|  | 1932       InstallWithIntrinsicDefaultProto(isolate, function, | 
|  | 1933                                        Context::PROMISE_HANDLE_REJECT_INDEX); | 
|  | 1934       // Set up catch prediction | 
|  | 1935       Handle<Code> promise_handle = isolate->builtins()->PromiseHandleReject(); | 
|  | 1936       promise_handle->set_is_exception_caught(true); | 
|  | 1937     } | 
|  | 1938 | 
| 1918     { | 1939     { | 
| 1919       Handle<Code> code = | 1940       Handle<Code> code = | 
| 1920           handle(isolate->builtins()->builtin(Builtins::kPromiseResolveClosure), | 1941           handle(isolate->builtins()->builtin(Builtins::kPromiseResolveClosure), | 
| 1921                  isolate); | 1942                  isolate); | 
| 1922       Handle<SharedFunctionInfo> info = | 1943       Handle<SharedFunctionInfo> info = | 
| 1923           factory->NewSharedFunctionInfo(factory->empty_string(), code, false); | 1944           factory->NewSharedFunctionInfo(factory->empty_string(), code, false); | 
| 1924       info->set_internal_formal_parameter_count(1); | 1945       info->set_internal_formal_parameter_count(1); | 
| 1925       info->set_length(1); | 1946       info->set_length(1); | 
| 1926       native_context()->set_promise_resolve_shared_fun(*info); | 1947       native_context()->set_promise_resolve_shared_fun(*info); | 
| 1927 | 1948 | 
| (...skipping 2726 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 4654 } | 4675 } | 
| 4655 | 4676 | 
| 4656 | 4677 | 
| 4657 // Called when the top-level V8 mutex is destroyed. | 4678 // Called when the top-level V8 mutex is destroyed. | 
| 4658 void Bootstrapper::FreeThreadResources() { | 4679 void Bootstrapper::FreeThreadResources() { | 
| 4659   DCHECK(!IsActive()); | 4680   DCHECK(!IsActive()); | 
| 4660 } | 4681 } | 
| 4661 | 4682 | 
| 4662 }  // namespace internal | 4683 }  // namespace internal | 
| 4663 }  // namespace v8 | 4684 }  // namespace v8 | 
| OLD | NEW | 
|---|