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

Side by Side Diff: src/objects-debug.cc

Issue 2567333002: [promises] port NewPromiseCapability to TF (Closed)
Patch Set: git rid of stuff that snuck into patch Created 3 years, 12 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
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/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 194
195 case JS_STRING_ITERATOR_TYPE: 195 case JS_STRING_ITERATOR_TYPE:
196 JSStringIterator::cast(this)->JSStringIteratorVerify(); 196 JSStringIterator::cast(this)->JSStringIteratorVerify();
197 break; 197 break;
198 case JS_WEAK_MAP_TYPE: 198 case JS_WEAK_MAP_TYPE:
199 JSWeakMap::cast(this)->JSWeakMapVerify(); 199 JSWeakMap::cast(this)->JSWeakMapVerify();
200 break; 200 break;
201 case JS_WEAK_SET_TYPE: 201 case JS_WEAK_SET_TYPE:
202 JSWeakSet::cast(this)->JSWeakSetVerify(); 202 JSWeakSet::cast(this)->JSWeakSetVerify();
203 break; 203 break;
204 case JS_PROMISE_CAPABILITY_TYPE:
205 JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify();
206 break;
204 case JS_PROMISE_TYPE: 207 case JS_PROMISE_TYPE:
205 JSPromise::cast(this)->JSPromiseVerify(); 208 JSPromise::cast(this)->JSPromiseVerify();
206 break; 209 break;
207 case JS_REGEXP_TYPE: 210 case JS_REGEXP_TYPE:
208 JSRegExp::cast(this)->JSRegExpVerify(); 211 JSRegExp::cast(this)->JSRegExpVerify();
209 break; 212 break;
210 case FILLER_TYPE: 213 case FILLER_TYPE:
211 break; 214 break;
212 case JS_PROXY_TYPE: 215 case JS_PROXY_TYPE:
213 JSProxy::cast(this)->JSProxyVerify(); 216 JSProxy::cast(this)->JSProxyVerify();
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
876 CHECK_LE(index(), String::kMaxLength); 879 CHECK_LE(index(), String::kMaxLength);
877 } 880 }
878 881
879 void JSWeakSet::JSWeakSetVerify() { 882 void JSWeakSet::JSWeakSetVerify() {
880 CHECK(IsJSWeakSet()); 883 CHECK(IsJSWeakSet());
881 JSObjectVerify(); 884 JSObjectVerify();
882 VerifyHeapPointer(table()); 885 VerifyHeapPointer(table());
883 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); 886 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
884 } 887 }
885 888
889 void JSPromiseCapability::JSPromiseCapabilityVerify() {
890 CHECK(IsJSPromiseCapability());
891 Isolate* const isolate = GetIsolate();
gsathya 2016/12/29 21:48:47 do you need the isolate here?
caitp 2017/01/02 15:51:12 Oop, done
892 JSObjectVerify();
893 VerifyPointer(promise());
894 VerifyPointer(resolve());
895 VerifyPointer(reject());
896 }
897
886 void JSPromise::JSPromiseVerify() { 898 void JSPromise::JSPromiseVerify() {
887 CHECK(IsJSPromise()); 899 CHECK(IsJSPromise());
888 JSObjectVerify(); 900 JSObjectVerify();
889 Isolate* isolate = GetIsolate(); 901 Isolate* isolate = GetIsolate();
890 CHECK(result()->IsUndefined(isolate) || result()->IsObject()); 902 CHECK(result()->IsUndefined(isolate) || result()->IsObject());
891 CHECK(deferred()->IsUndefined(isolate) || deferred()->IsJSObject() || 903 CHECK(deferred()->IsUndefined(isolate) || deferred()->IsJSObject() ||
892 deferred()->IsFixedArray()); 904 deferred()->IsFixedArray());
893 CHECK(fulfill_reactions()->IsUndefined(isolate) || 905 CHECK(fulfill_reactions()->IsUndefined(isolate) ||
894 fulfill_reactions()->IsCallable() || 906 fulfill_reactions()->IsCallable() ||
895 fulfill_reactions()->IsFixedArray()); 907 fulfill_reactions()->IsFixedArray());
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 1541
1530 // Both are done at the same time. 1542 // Both are done at the same time.
1531 CHECK_EQ(new_it.done(), old_it.done()); 1543 CHECK_EQ(new_it.done(), old_it.done());
1532 } 1544 }
1533 1545
1534 1546
1535 #endif // DEBUG 1547 #endif // DEBUG
1536 1548
1537 } // namespace internal 1549 } // namespace internal
1538 } // namespace v8 1550 } // namespace v8
OLDNEW
« src/objects.h ('K') | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698