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

Side by Side Diff: src/runtime/runtime-internal.cc

Issue 2362503003: [promises] PromiseResolveThenableJob: change then to be a JSReceiver (Closed)
Patch Set: Created 4 years, 2 months 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
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/regress/regress-649078.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 else 551 else
552 std::fflush(f); 552 std::fflush(f);
553 return isolate->heap()->undefined_value(); 553 return isolate->heap()->undefined_value();
554 } 554 }
555 } 555 }
556 556
557 RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) { 557 RUNTIME_FUNCTION(Runtime_EnqueuePromiseResolveThenableJob) {
558 HandleScope scope(isolate); 558 HandleScope scope(isolate);
559 DCHECK(args.length() == 6); 559 DCHECK(args.length() == 6);
560 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, resolution, 0); 560 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, resolution, 0);
561 CONVERT_ARG_HANDLE_CHECKED(JSFunction, then, 1); 561 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, then, 1);
562 CONVERT_ARG_HANDLE_CHECKED(JSFunction, resolve, 2); 562 CONVERT_ARG_HANDLE_CHECKED(JSFunction, resolve, 2);
563 CONVERT_ARG_HANDLE_CHECKED(JSFunction, reject, 3); 563 CONVERT_ARG_HANDLE_CHECKED(JSFunction, reject, 3);
564 CONVERT_ARG_HANDLE_CHECKED(Object, before_debug_event, 4); 564 CONVERT_ARG_HANDLE_CHECKED(Object, before_debug_event, 4);
565 CONVERT_ARG_HANDLE_CHECKED(Object, after_debug_event, 5); 565 CONVERT_ARG_HANDLE_CHECKED(Object, after_debug_event, 5);
566 Handle<PromiseContainer> container = isolate->factory()->NewPromiseContainer( 566 Handle<PromiseContainer> container = isolate->factory()->NewPromiseContainer(
567 resolution, then, resolve, reject, before_debug_event, after_debug_event); 567 resolution, then, resolve, reject, before_debug_event, after_debug_event);
568 isolate->EnqueueMicrotask(container); 568 isolate->EnqueueMicrotask(container);
569 return isolate->heap()->undefined_value(); 569 return isolate->heap()->undefined_value();
570 } 570 }
571 571
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 604
605 RUNTIME_FUNCTION(Runtime_Typeof) { 605 RUNTIME_FUNCTION(Runtime_Typeof) {
606 HandleScope scope(isolate); 606 HandleScope scope(isolate);
607 DCHECK_EQ(1, args.length()); 607 DCHECK_EQ(1, args.length());
608 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 608 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
609 return *Object::TypeOf(isolate, object); 609 return *Object::TypeOf(isolate, object);
610 } 610 }
611 611
612 } // namespace internal 612 } // namespace internal
613 } // namespace v8 613 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/mjsunit/regress/regress-649078.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698