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

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

Issue 2415023002: [promises] Move async debug event creation to c++ (Closed)
Patch Set: use consts 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
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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 value()->ObjectVerify(); 912 value()->ObjectVerify();
913 } 913 }
914 914
915 void PromiseResolveThenableJobInfo::PromiseResolveThenableJobInfoVerify() { 915 void PromiseResolveThenableJobInfo::PromiseResolveThenableJobInfoVerify() {
916 Isolate* isolate = GetIsolate(); 916 Isolate* isolate = GetIsolate();
917 CHECK(IsPromiseResolveThenableJobInfo()); 917 CHECK(IsPromiseResolveThenableJobInfo());
918 CHECK(thenable()->IsJSReceiver()); 918 CHECK(thenable()->IsJSReceiver());
919 CHECK(then()->IsJSReceiver()); 919 CHECK(then()->IsJSReceiver());
920 CHECK(resolve()->IsJSFunction()); 920 CHECK(resolve()->IsJSFunction());
921 CHECK(reject()->IsJSFunction()); 921 CHECK(reject()->IsJSFunction());
922 CHECK(before_debug_event()->IsJSObject() || 922 CHECK(id()->IsSmi() || id()->IsUndefined(isolate) || id()->IsObject());
adamk 2016/10/13 15:59:10 What is the IsObject() case for (and how could tha
gsathya 2016/10/13 21:27:30 That was just a catch-all, since Smi isn't guarant
923 before_debug_event()->IsUndefined(isolate)); 923 CHECK(name()->IsString() || name()->IsUndefined(isolate));
924 CHECK(after_debug_event()->IsJSObject() ||
925 after_debug_event()->IsUndefined(isolate));
926 } 924 }
927 925
928 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() { 926 void PromiseReactionJobInfo::PromiseReactionJobInfoVerify() {
929 Isolate* isolate = GetIsolate(); 927 Isolate* isolate = GetIsolate();
930 CHECK(IsPromiseReactionJobInfo()); 928 CHECK(IsPromiseReactionJobInfo());
931 CHECK(value()->IsObject()); 929 CHECK(value()->IsObject());
932 CHECK(tasks()->IsJSArray() || tasks()->IsCallable()); 930 CHECK(tasks()->IsJSArray() || tasks()->IsCallable());
933 CHECK(deferred()->IsJSObject() || deferred()->IsUndefined(isolate)); 931 CHECK(deferred()->IsJSObject() || deferred()->IsUndefined(isolate));
934 CHECK(before_debug_event()->IsJSObject() || 932 CHECK(id()->IsSmi() || id()->IsUndefined(isolate) || id()->IsObject());
935 before_debug_event()->IsUndefined(isolate)); 933 CHECK(name()->IsString() || name()->IsUndefined(isolate));
936 CHECK(after_debug_event()->IsJSObject() ||
937 after_debug_event()->IsUndefined(isolate));
938 CHECK(context()->IsContext()); 934 CHECK(context()->IsContext());
939 } 935 }
940 936
941 void JSModuleNamespace::JSModuleNamespaceVerify() { 937 void JSModuleNamespace::JSModuleNamespaceVerify() {
942 CHECK(IsJSModuleNamespace()); 938 CHECK(IsJSModuleNamespace());
943 module()->ObjectVerify(); 939 module()->ObjectVerify();
944 } 940 }
945 941
946 void Module::ModuleVerify() { 942 void Module::ModuleVerify() {
947 Isolate* isolate = GetIsolate(); 943 Isolate* isolate = GetIsolate();
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 1384
1389 // Both are done at the same time. 1385 // Both are done at the same time.
1390 CHECK_EQ(new_it.done(), old_it.done()); 1386 CHECK_EQ(new_it.done(), old_it.done());
1391 } 1387 }
1392 1388
1393 1389
1394 #endif // DEBUG 1390 #endif // DEBUG
1395 1391
1396 } // namespace internal 1392 } // namespace internal
1397 } // namespace v8 1393 } // namespace v8
OLDNEW
« src/objects.h ('K') | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698