Unreviewed, rolling out r248709.
authorryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 20:09:15 +0000 (20:09 +0000)
committerryanhaddad@apple.com <ryanhaddad@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 20:09:15 +0000 (20:09 +0000)
Caused test/built-ins/Promise/prototype/finally/this-value-
non-promise.js to fail on test262 bot

Reverted changeset:

"ProxyObject should not be allow to access its target's
private properties."
https://bugs.webkit.org/show_bug.cgi?id=200739
https://trac.webkit.org/changeset/248709

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@248786 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JSTests/ChangeLog
JSTests/stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js [deleted file]
JSTests/stress/proxy-with-private-symbols.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ProxyObject.cpp

index 98bec5f..4d3599e 100644 (file)
@@ -1,3 +1,17 @@
+2019-08-16  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r248709.
+
+        Caused test/built-ins/Promise/prototype/finally/this-value-
+        non-promise.js to fail on test262 bot
+
+        Reverted changeset:
+
+        "ProxyObject should not be allow to access its target's
+        private properties."
+        https://bugs.webkit.org/show_bug.cgi?id=200739
+        https://trac.webkit.org/changeset/248709
+
 2019-08-15  Alexey Shvayka  <shvaikalesh@gmail.com>
 
         DateConversion::formatDateTime incorrectly formats negative years
diff --git a/JSTests/stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js b/JSTests/stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js
deleted file mode 100644 (file)
index 27e25d2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-var foo = (function* bar() {
-    try {
-        yield* x;
-    } finally {
-        try {
-            y;
-        } finally {
-            return;
-        }
-    }
-}) ();
-
-var x = new Proxy(foo, {});
-try {
-    x.next();
-} catch (e) {
-    exception = e;
-}
-
-if (exception != 'TypeError: |this| should be a generator')
-    throw "FAILED";
index 5b026b0..0bf1cfb 100644 (file)
@@ -81,7 +81,7 @@ function assert(b) {
             assert(e.message === "%ArrayIteratorPrototype%.next requires that |this| be an Array Iterator instance");
             threw = true;
         }
-        assert(threw);
+        assert(!threw);
         assert(!sawPrivateSymbolAsString);
         sawPrivateSymbolAsString = false;
     }
index a8db389..d874baf 100644 (file)
@@ -1,3 +1,17 @@
+2019-08-16  Ryan Haddad  <ryanhaddad@apple.com>
+
+        Unreviewed, rolling out r248709.
+
+        Caused test/built-ins/Promise/prototype/finally/this-value-
+        non-promise.js to fail on test262 bot
+
+        Reverted changeset:
+
+        "ProxyObject should not be allow to access its target's
+        private properties."
+        https://bugs.webkit.org/show_bug.cgi?id=200739
+        https://trac.webkit.org/changeset/248709
+
 2019-08-15  Yusuke Suzuki  <ysuzuki@apple.com>
 
         [WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part
index 1373a83..50e1ba1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016-2019 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2016-2017 Apple Inc. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -143,7 +143,7 @@ static JSValue performProxyGet(ExecState* exec, ProxyObject* proxyObject, JSValu
     };
 
     if (propertyName.isPrivateName())
-        return jsUndefined();
+        return performDefaultGet();
 
     JSValue handlerValue = proxyObject->handler();
     if (handlerValue.isNull())
@@ -214,7 +214,7 @@ bool ProxyObject::performInternalMethodGetOwnProperty(ExecState* exec, PropertyN
     };
 
     if (propertyName.isPrivateName())
-        return false;
+        RELEASE_AND_RETURN(scope, performDefaultGetOwnProperty());
 
     JSValue handlerValue = this->handler();
     if (handlerValue.isNull()) {
@@ -323,7 +323,7 @@ bool ProxyObject::performHasProperty(ExecState* exec, PropertyName propertyName,
     };
 
     if (propertyName.isPrivateName())
-        return false;
+        RELEASE_AND_RETURN(scope, performDefaultHasProperty());
 
     JSValue handlerValue = this->handler();
     if (handlerValue.isNull()) {
@@ -425,7 +425,7 @@ bool ProxyObject::performPut(ExecState* exec, JSValue putValue, JSValue thisValu
     }
 
     if (propertyName.isPrivateName())
-        return false;
+        RELEASE_AND_RETURN(scope, performDefaultPut());
 
     JSValue handlerValue = this->handler();
     if (handlerValue.isNull()) {
@@ -628,7 +628,7 @@ bool ProxyObject::performDelete(ExecState* exec, PropertyName propertyName, Defa
     }
 
     if (propertyName.isPrivateName())
-        return false;
+        RELEASE_AND_RETURN(scope, performDefaultDelete());
 
     JSValue handlerValue = this->handler();
     if (handlerValue.isNull()) {
@@ -827,7 +827,7 @@ bool ProxyObject::performDefineOwnProperty(ExecState* exec, PropertyName propert
     };
 
     if (propertyName.isPrivateName())
-        return false;
+        return performDefaultDefineOwnProperty();
 
     JSValue handlerValue = this->handler();
     if (handlerValue.isNull()) {