Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: src/factory.cc

Issue 2590563003: [promises] Remove deferred object (Closed)
Patch Set: Remove comment Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 result->set_resolve(*resolve); 1013 result->set_resolve(*resolve);
1014 result->set_reject(*reject); 1014 result->set_reject(*reject);
1015 result->set_debug_id(*debug_id); 1015 result->set_debug_id(*debug_id);
1016 result->set_debug_name(*debug_name); 1016 result->set_debug_name(*debug_name);
1017 result->set_context(*context); 1017 result->set_context(*context);
1018 return result; 1018 return result;
1019 } 1019 }
1020 1020
1021 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo( 1021 Handle<PromiseReactionJobInfo> Factory::NewPromiseReactionJobInfo(
1022 Handle<JSPromise> promise, Handle<Object> value, Handle<Object> tasks, 1022 Handle<JSPromise> promise, Handle<Object> value, Handle<Object> tasks,
1023 Handle<Object> deferred, Handle<Object> debug_id, Handle<Object> debug_name, 1023 Handle<Object> deferred_promise, Handle<Object> deferred_on_resolve,
1024 Handle<Context> context) { 1024 Handle<Object> deferred_on_reject, Handle<Context> context) {
1025 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast( 1025 Handle<PromiseReactionJobInfo> result = Handle<PromiseReactionJobInfo>::cast(
1026 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE)); 1026 NewStruct(PROMISE_REACTION_JOB_INFO_TYPE));
1027 result->set_promise(*promise); 1027 result->set_promise(*promise);
1028 result->set_value(*value); 1028 result->set_value(*value);
1029 result->set_tasks(*tasks); 1029 result->set_tasks(*tasks);
1030 result->set_deferred(*deferred); 1030 result->set_deferred_promise(*deferred_promise);
1031 result->set_debug_id(*debug_id); 1031 result->set_deferred_on_resolve(*deferred_on_resolve);
1032 result->set_debug_name(*debug_name); 1032 result->set_deferred_on_reject(*deferred_on_reject);
1033 result->set_debug_id(isolate()->heap()->undefined_value());
1034 result->set_debug_name(isolate()->heap()->undefined_value());
1033 result->set_context(*context); 1035 result->set_context(*context);
1034 return result; 1036 return result;
1035 } 1037 }
1036 1038
1037 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry( 1039 Handle<AliasedArgumentsEntry> Factory::NewAliasedArgumentsEntry(
1038 int aliased_context_slot) { 1040 int aliased_context_slot) {
1039 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast( 1041 Handle<AliasedArgumentsEntry> entry = Handle<AliasedArgumentsEntry>::cast(
1040 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE)); 1042 NewStruct(ALIASED_ARGUMENTS_ENTRY_TYPE));
1041 entry->set_aliased_context_slot(aliased_context_slot); 1043 entry->set_aliased_context_slot(aliased_context_slot);
1042 return entry; 1044 return entry;
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 Handle<AccessorInfo> prototype = 2771 Handle<AccessorInfo> prototype =
2770 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs); 2772 Accessors::FunctionPrototypeInfo(isolate(), rw_attribs);
2771 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), 2773 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
2772 prototype, rw_attribs); 2774 prototype, rw_attribs);
2773 map->AppendDescriptor(&d); 2775 map->AppendDescriptor(&d);
2774 } 2776 }
2775 } 2777 }
2776 2778
2777 } // namespace internal 2779 } // namespace internal
2778 } // namespace v8 2780 } // namespace v8
OLDNEW
« src/builtins/builtins-promise.cc ('K') | « src/factory.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698