[proxies] Improve JSProxyVerify and test most proxy invariants.
BUG= Review URL: https://codereview.chromium.org/1549793003 Cr-Commit-Position: refs/heads/master@{#33032}
This commit is contained in:
parent
5ca478a556
commit
f17c1d1140
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user