Index: src/objects-debug.cc |
diff --git a/src/objects-debug.cc b/src/objects-debug.cc |
index a05d1e703626b125635e9ce15ea935164545023d..5f44f2a1d7cc3758ae6493d03df52b0f74ed388b 100644 |
--- a/src/objects-debug.cc |
+++ b/src/objects-debug.cc |
@@ -114,6 +114,9 @@ void HeapObject::HeapObjectVerify() { |
case JS_DATE_TYPE: |
JSDate::cast(this)->JSDateVerify(); |
break; |
+ case JS_BOUND_FUNCTION_TYPE: |
+ JSBoundFunction::cast(this)->JSBoundFunctionVerify(); |
+ break; |
case JS_FUNCTION_TYPE: |
JSFunction::cast(this)->JSFunctionVerify(); |
break; |
@@ -542,6 +545,18 @@ void SlicedString::SlicedStringVerify() { |
} |
+void JSBoundFunction::JSBoundFunctionVerify() { |
+ CHECK(IsJSBoundFunction()); |
+ VerifyObjectField(kLengthOffset); |
+ VerifyObjectField(kNameOffset); |
+ VerifyObjectField(kBoundThisOffset); |
+ VerifyObjectField(kBoundTargetFunctionOffset); |
+ VerifyObjectField(kBoundArgumentsOffset); |
+ CHECK(bound_target_function()->IsCallable()); |
+ CHECK(map()->is_callable()); |
Camillo Bruni
2015/12/23 13:52:27
Please also add a check bound_target_function()->I
Benedikt Meurer
2015/12/24 06:28:18
Actually btf->IsConstructor() <=> IsConstructor().
|
+} |
+ |
+ |
void JSFunction::JSFunctionVerify() { |
CHECK(IsJSFunction()); |
VerifyObjectField(kPrototypeOrInitialMapOffset); |