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

Unified Diff: src/objects-debug.cc

Issue 2933283002: [objects] Relax JSBoundFunction verification. (Closed)
Patch Set: Address comments. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 36a21351c16a71040474b1383ce41a90d278d173..aba55ecd75cd03f3412cc8237038a4d48f8cce43 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -687,11 +687,14 @@ void JSBoundFunction::JSBoundFunctionVerify() {
VerifyObjectField(kBoundThisOffset);
VerifyObjectField(kBoundTargetFunctionOffset);
VerifyObjectField(kBoundArgumentsOffset);
- CHECK(bound_target_function()->IsCallable());
CHECK(IsCallable());
- CHECK_EQ(IsConstructor(), bound_target_function()->IsConstructor());
-}
+ Isolate* const isolate = GetIsolate();
+ if (!raw_bound_target_function()->IsUndefined(isolate)) {
+ CHECK(bound_target_function()->IsCallable());
+ CHECK_EQ(IsConstructor(), bound_target_function()->IsConstructor());
+ }
+}
void JSFunction::JSFunctionVerify() {
CHECK(IsJSFunction());
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698