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

Unified Diff: src/objects-debug.cc

Issue 1549793003: [proxies] Improve JSProxyVerify and test most proxy invariants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing nits Created 5 years 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 | « no previous file | no next file » | 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 e7ee7eca7731c3fe9593055f4fc2906b7ec1dfd5..6d99a6f2277e1e0edd31174264b986a3cd04becc 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -818,8 +818,14 @@ void JSRegExp::JSRegExpVerify() {
void JSProxy::JSProxyVerify() {
CHECK(IsJSProxy());
+ VerifyPointer(target());
VerifyPointer(handler());
+ CHECK_EQ(target()->IsCallable(), map()->is_callable());
+ CHECK_EQ(target()->IsConstructor(), map()->is_constructor());
CHECK(hash()->IsSmi() || hash()->IsUndefined());
+ CHECK(map()->prototype()->IsNull());
+ // There should be no properties on a Proxy.
+ CHECK_EQ(0, map()->NumberOfOwnDescriptors());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698