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

Side by Side Diff: src/isolate.cc

Issue 2695593002: [promises] cleanup default promise handlers (Closed)
Patch Set: remove unused var Created 3 years, 10 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/heap-symbols.h ('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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1871 1871
1872 if (queue->IsUndefined(isolate)) { 1872 if (queue->IsUndefined(isolate)) {
1873 return false; 1873 return false;
1874 } 1874 }
1875 1875
1876 if (queue->IsCallable()) { 1876 if (queue->IsCallable()) {
1877 return PromiseHandlerCheck(isolate, Handle<JSReceiver>::cast(queue), 1877 return PromiseHandlerCheck(isolate, Handle<JSReceiver>::cast(queue),
1878 Handle<JSReceiver>::cast(deferred_promise)); 1878 Handle<JSReceiver>::cast(deferred_promise));
1879 } 1879 }
1880 1880
1881 if (queue->IsSymbol()) {
1882 return InternalPromiseHasUserDefinedRejectHandler(
1883 isolate, Handle<JSPromise>::cast(deferred_promise));
1884 }
1885
1881 Handle<FixedArray> queue_arr = Handle<FixedArray>::cast(queue); 1886 Handle<FixedArray> queue_arr = Handle<FixedArray>::cast(queue);
1882 Handle<FixedArray> deferred_promise_arr = 1887 Handle<FixedArray> deferred_promise_arr =
1883 Handle<FixedArray>::cast(deferred_promise); 1888 Handle<FixedArray>::cast(deferred_promise);
1884 for (int i = 0; i < deferred_promise_arr->length(); i++) { 1889 for (int i = 0; i < deferred_promise_arr->length(); i++) {
1885 Handle<JSReceiver> queue_item(JSReceiver::cast(queue_arr->get(i))); 1890 Handle<JSReceiver> queue_item(JSReceiver::cast(queue_arr->get(i)));
1886 Handle<JSReceiver> deferred_promise_item( 1891 Handle<JSReceiver> deferred_promise_item(
1887 JSReceiver::cast(deferred_promise_arr->get(i))); 1892 JSReceiver::cast(deferred_promise_arr->get(i)));
1888 if (PromiseHandlerCheck(isolate, queue_item, deferred_promise_item)) { 1893 if (PromiseHandlerCheck(isolate, queue_item, deferred_promise_item)) {
1889 return true; 1894 return true;
1890 } 1895 }
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3657 // Then check whether this scope intercepts. 3662 // Then check whether this scope intercepts.
3658 if ((flag & intercept_mask_)) { 3663 if ((flag & intercept_mask_)) {
3659 intercepted_flags_ |= flag; 3664 intercepted_flags_ |= flag;
3660 return true; 3665 return true;
3661 } 3666 }
3662 return false; 3667 return false;
3663 } 3668 }
3664 3669
3665 } // namespace internal 3670 } // namespace internal
3666 } // namespace v8 3671 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap-symbols.h ('k') | src/js/promise.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698