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/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
974 Handle<Struct> Factory::NewStruct(InstanceType type) { | 974 Handle<Struct> Factory::NewStruct(InstanceType type) { |
975 CALL_HEAP_FUNCTION( | 975 CALL_HEAP_FUNCTION( |
976 isolate(), | 976 isolate(), |
977 isolate()->heap()->AllocateStruct(type), | 977 isolate()->heap()->AllocateStruct(type), |
978 Struct); | 978 Struct); |
979 } | 979 } |
980 | 980 |
981 Handle<PromiseResolveThenableJobInfo> Factory::NewPromiseResolveThenableJobInfo( | 981 Handle<PromiseResolveThenableJobInfo> Factory::NewPromiseResolveThenableJobInfo( |
982 Handle<JSReceiver> thenable, Handle<JSReceiver> then, | 982 Handle<JSReceiver> thenable, Handle<JSReceiver> then, |
983 Handle<JSFunction> resolve, Handle<JSFunction> reject, | 983 Handle<JSFunction> resolve, Handle<JSFunction> reject, |
984 Handle<Object> debug_id, Handle<Object> debug_name) { | 984 Handle<Object> debug_id, Handle<Object> debug_name, |
| 985 Handle<Context> context) { |
985 Handle<PromiseResolveThenableJobInfo> result = | 986 Handle<PromiseResolveThenableJobInfo> result = |
986 Handle<PromiseResolveThenableJobInfo>::cast( | 987 Handle<PromiseResolveThenableJobInfo>::cast( |
987 NewStruct(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE)); | 988 NewStruct(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE)); |
988 result->set_thenable(*thenable); | 989 result->set_thenable(*thenable); |
989 result->set_then(*then); | 990 result->set_then(*then); |
990 result->set_resolve(*resolve); | 991 result->set_resolve(*resolve); |
991 result->set_reject(*reject); | 992 result->set_reject(*reject); |
992 result->set_debug_id(*debug_id); | 993 result->set_debug_id(*debug_id); |
993 result->set_debug_name(*debug_name); | 994 result->set_debug_name(*debug_name); |
| 995 result->set_context(*context); |
994 return result; | 996 return result; |
995 } | 997 } |
996 | 998 |
997 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( | 999 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( |
998 Handle<Object> value, Handle<Object> tasks, Handle<Object> deferred, | 1000 Handle<Object> value, Handle<Object> tasks, Handle<Object> deferred, |
999 Handle<Object> debug_id, Handle<Object> debug_name, | 1001 Handle<Object> debug_id, Handle<Object> debug_name, |
1000 Handle<Context> context) { | 1002 Handle<Context> context) { |
1001 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast( | 1003 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast( |
1002 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE)); | 1004 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE)); |
1003 result->set_value(*value); | 1005 result->set_value(*value); |
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2705 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2707 Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); |
2706 iterator->set_initial_next(*next); | 2708 iterator->set_initial_next(*next); |
2707 iterator->set_array(*array); | 2709 iterator->set_array(*array); |
2708 iterator->set_index(0); | 2710 iterator->set_index(0); |
2709 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2711 iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); |
2710 return iterator; | 2712 return iterator; |
2711 } | 2713 } |
2712 | 2714 |
2713 } // namespace internal | 2715 } // namespace internal |
2714 } // namespace v8 | 2716 } // namespace v8 |
OLD | NEW |