OLD | NEW |
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 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
881 JSObjectVerify(); | 881 JSObjectVerify(); |
882 VerifyHeapPointer(table()); | 882 VerifyHeapPointer(table()); |
883 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); | 883 CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate())); |
884 } | 884 } |
885 | 885 |
886 void JSPromise::JSPromiseVerify() { | 886 void JSPromise::JSPromiseVerify() { |
887 CHECK(IsJSPromise()); | 887 CHECK(IsJSPromise()); |
888 JSObjectVerify(); | 888 JSObjectVerify(); |
889 Isolate* isolate = GetIsolate(); | 889 Isolate* isolate = GetIsolate(); |
890 CHECK(result()->IsUndefined(isolate) || result()->IsObject()); | 890 CHECK(result()->IsUndefined(isolate) || result()->IsObject()); |
891 CHECK(deferred()->IsUndefined(isolate) || deferred()->IsJSObject() || | 891 CHECK(deferred_promise()->IsUndefined(isolate) || |
892 deferred()->IsFixedArray()); | 892 deferred_promise()->IsJSReceiver() || |
| 893 deferred_promise()->IsFixedArray()); |
| 894 CHECK(deferred_on_resolve()->IsUndefined(isolate) || |
| 895 deferred_on_resolve()->IsCallable() || |
| 896 deferred_on_resolve()->IsFixedArray()); |
| 897 CHECK(deferred_on_reject()->IsUndefined(isolate) || |
| 898 deferred_on_reject()->IsCallable() || |
| 899 deferred_on_reject()->IsFixedArray()); |
893 CHECK(fulfill_reactions()->IsUndefined(isolate) || | 900 CHECK(fulfill_reactions()->IsUndefined(isolate) || |
894 fulfill_reactions()->IsCallable() || | 901 fulfill_reactions()->IsCallable() || |
895 fulfill_reactions()->IsFixedArray()); | 902 fulfill_reactions()->IsFixedArray()); |
896 CHECK(reject_reactions()->IsUndefined(isolate) || | 903 CHECK(reject_reactions()->IsUndefined(isolate) || |
897 reject_reactions()->IsCallable() || reject_reactions()->IsFixedArray()); | 904 reject_reactions()->IsCallable() || reject_reactions()->IsFixedArray()); |
898 } | 905 } |
899 | 906 |
900 void JSRegExp::JSRegExpVerify() { | 907 void JSRegExp::JSRegExpVerify() { |
901 JSObjectVerify(); | 908 JSObjectVerify(); |
902 Isolate* isolate = GetIsolate(); | 909 Isolate* isolate = GetIsolate(); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1018 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); | 1025 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); |
1019 CHECK(context()->IsContext()); | 1026 CHECK(context()->IsContext()); |
1020 } | 1027 } |
1021 | 1028 |
1022 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { | 1029 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { |
1023 Isolate* isolate = GetIsolate(); | 1030 Isolate* isolate = GetIsolate(); |
1024 CHECK(IsPromiseReactionJobInfo()); | 1031 CHECK(IsPromiseReactionJobInfo()); |
1025 CHECK(promise()->IsJSPromise()); | 1032 CHECK(promise()->IsJSPromise()); |
1026 CHECK(value()->IsObject()); | 1033 CHECK(value()->IsObject()); |
1027 CHECK(tasks()->IsFixedArray() || tasks()->IsCallable()); | 1034 CHECK(tasks()->IsFixedArray() || tasks()->IsCallable()); |
1028 CHECK(deferred()->IsFixedArray() || deferred()->IsJSObject()); | 1035 CHECK(deferred_promise()->IsUndefined(isolate) || |
| 1036 deferred_promise()->IsJSReceiver() || |
| 1037 deferred_promise()->IsFixedArray()); |
| 1038 CHECK(deferred_on_resolve()->IsUndefined(isolate) || |
| 1039 deferred_on_resolve()->IsCallable() || |
| 1040 deferred_on_resolve()->IsFixedArray()); |
| 1041 CHECK(deferred_on_reject()->IsUndefined(isolate) || |
| 1042 deferred_on_reject()->IsCallable() || |
| 1043 deferred_on_reject()->IsFixedArray()); |
1029 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); | 1044 CHECK(debug_id()->IsNumber() || debug_id()->IsUndefined(isolate)); |
1030 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); | 1045 CHECK(debug_name()->IsString() || debug_name()->IsUndefined(isolate)); |
1031 CHECK(context()->IsContext()); | 1046 CHECK(context()->IsContext()); |
1032 } | 1047 } |
1033 | 1048 |
1034 void JSModuleNamespace::JSModuleNamespaceVerify() { | 1049 void JSModuleNamespace::JSModuleNamespaceVerify() { |
1035 CHECK(IsJSModuleNamespace()); | 1050 CHECK(IsJSModuleNamespace()); |
1036 VerifyPointer(module()); | 1051 VerifyPointer(module()); |
1037 } | 1052 } |
1038 | 1053 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 | 1544 |
1530 // Both are done at the same time. | 1545 // Both are done at the same time. |
1531 CHECK_EQ(new_it.done(), old_it.done()); | 1546 CHECK_EQ(new_it.done(), old_it.done()); |
1532 } | 1547 } |
1533 | 1548 |
1534 | 1549 |
1535 #endif // DEBUG | 1550 #endif // DEBUG |
1536 | 1551 |
1537 } // namespace internal | 1552 } // namespace internal |
1538 } // namespace v8 | 1553 } // namespace v8 |
OLD | NEW |