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

Side by Side Diff: src/isolate.cc

Issue 2487053002: [promises] Remove one runtime call to create_resolving_functions (Closed)
Patch Set: add dcheck Created 4 years, 1 month 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/factory.cc ('k') | src/js/promise.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 3239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3250 v8::MicrotaskCallback callback = 3250 v8::MicrotaskCallback callback =
3251 v8::ToCData<v8::MicrotaskCallback>(callback_info->callback()); 3251 v8::ToCData<v8::MicrotaskCallback>(callback_info->callback());
3252 void* data = v8::ToCData<void*>(callback_info->data()); 3252 void* data = v8::ToCData<void*>(callback_info->data());
3253 callback(data); 3253 callback(data);
3254 } else { 3254 } else {
3255 SaveContext save(this); 3255 SaveContext save(this);
3256 Context* context; 3256 Context* context;
3257 if (microtask->IsJSFunction()) { 3257 if (microtask->IsJSFunction()) {
3258 context = Handle<JSFunction>::cast(microtask)->context(); 3258 context = Handle<JSFunction>::cast(microtask)->context();
3259 } else if (microtask->IsPromiseResolveThenableJobInfo()) { 3259 } else if (microtask->IsPromiseResolveThenableJobInfo()) {
3260 context = Handle<PromiseResolveThenableJobInfo>::cast(microtask) 3260 context =
3261 ->resolve() 3261 Handle<PromiseResolveThenableJobInfo>::cast(microtask)->context();
3262 ->context();
3263 } else { 3262 } else {
3264 context = Handle<PromiseReactionJobInfo>::cast(microtask)->context(); 3263 context = Handle<PromiseReactionJobInfo>::cast(microtask)->context();
3265 } 3264 }
3266 3265
3267 set_context(context->native_context()); 3266 set_context(context->native_context());
3268 handle_scope_implementer_->EnterMicrotaskContext( 3267 handle_scope_implementer_->EnterMicrotaskContext(
3269 Handle<Context>(context, this)); 3268 Handle<Context>(context, this));
3270 3269
3271 MaybeHandle<Object> result; 3270 MaybeHandle<Object> result;
3272 MaybeHandle<Object> maybe_exception; 3271 MaybeHandle<Object> maybe_exception;
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3489 // Then check whether this scope intercepts. 3488 // Then check whether this scope intercepts.
3490 if ((flag & intercept_mask_)) { 3489 if ((flag & intercept_mask_)) {
3491 intercepted_flags_ |= flag; 3490 intercepted_flags_ |= flag;
3492 return true; 3491 return true;
3493 } 3492 }
3494 return false; 3493 return false;
3495 } 3494 }
3496 3495
3497 } // namespace internal 3496 } // namespace internal
3498 } // namespace v8 3497 } // namespace v8
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698