Changeset 248709 in webkit


Ignore:
Timestamp:
Aug 14, 2019 11:20:11 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

JSTests:
ProxyObject should not be allow to access its target's private properties.
https://bugs.webkit.org/show_bug.cgi?id=200739
<rdar://problem/53972768>

Reviewed by Yusuke Suzuki.

  • stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js: Added.
  • stress/proxy-with-private-symbols.js: Rebased.

Source/JavaScriptCore:
Remove support for macOS < 10.13
https://bugs.webkit.org/show_bug.cgi?id=200694
<rdar://problem/54278851>

Patch by Keith Rollin <Keith Rollin> on 2019-08-14
Reviewed by Youenn Fablet.

Update conditionals that reference MAC_OS_X_VERSION_MIN_REQUIRED and
MAC_OS_X_VERSION_MAX_ALLOWED, assuming that they both have values >=

  1. This means that expressions like

"MAC_OS_X_VERSION_MIN_REQUIRED < 101300" are always False and
"
MAC_OS_X_VERSION_MIN_REQUIRED >= 101300" are always True.

  • API/WebKitAvailability.h:
Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r248694 r248709  
     12019-08-14  Mark Lam  <mark.lam@apple.com>
     2
     3        ProxyObject should not be allow to access its target's private properties.
     4        https://bugs.webkit.org/show_bug.cgi?id=200739
     5        <rdar://problem/53972768>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/proxy-should-not-be-allowed-to-access-private-properties-of-target.js: Added.
     10        * stress/proxy-with-private-symbols.js: Rebased.
     11
    1122019-08-14  Mark Lam  <mark.lam@apple.com>
    213
  • trunk/JSTests/stress/proxy-with-private-symbols.js

    r198813 r248709  
    8282            threw = true;
    8383        }
    84         assert(!threw);
     84        assert(threw);
    8585        assert(!sawPrivateSymbolAsString);
    8686        sawPrivateSymbolAsString = false;
  • trunk/Source/JavaScriptCore/ChangeLog

    r248697 r248709  
    1414
    1515        * API/WebKitAvailability.h:
     16
     172019-08-14  Mark Lam  <mark.lam@apple.com>
     18
     19        ProxyObject should not be allow to access its target's private properties.
     20        https://bugs.webkit.org/show_bug.cgi?id=200739
     21        <rdar://problem/53972768>
     22
     23        Reviewed by Yusuke Suzuki.
     24
     25        * runtime/ProxyObject.cpp:
     26        (JSC::performProxyGet):
     27        (JSC::ProxyObject::performInternalMethodGetOwnProperty):
     28        (JSC::ProxyObject::performHasProperty):
     29        (JSC::ProxyObject::performPut):
     30        (JSC::ProxyObject::performDelete):
     31        (JSC::ProxyObject::performDefineOwnProperty):
    1632
    17332019-08-14  Mark Lam  <mark.lam@apple.com>
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp

    r247811 r248709  
    11/*
    2  * Copyright (C) 2016-2017 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2016-2019 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    144144
    145145    if (propertyName.isPrivateName())
    146         return performDefaultGet();
     146        return jsUndefined();
    147147
    148148    JSValue handlerValue = proxyObject->handler();
     
    215215
    216216    if (propertyName.isPrivateName())
    217         RELEASE_AND_RETURN(scope, performDefaultGetOwnProperty());
     217        return false;
    218218
    219219    JSValue handlerValue = this->handler();
     
    324324
    325325    if (propertyName.isPrivateName())
    326         RELEASE_AND_RETURN(scope, performDefaultHasProperty());
     326        return false;
    327327
    328328    JSValue handlerValue = this->handler();
     
    426426
    427427    if (propertyName.isPrivateName())
    428         RELEASE_AND_RETURN(scope, performDefaultPut());
     428        return false;
    429429
    430430    JSValue handlerValue = this->handler();
     
    629629
    630630    if (propertyName.isPrivateName())
    631         RELEASE_AND_RETURN(scope, performDefaultDelete());
     631        return false;
    632632
    633633    JSValue handlerValue = this->handler();
     
    828828
    829829    if (propertyName.isPrivateName())
    830         return performDefaultDefineOwnProperty();
     830        return false;
    831831
    832832    JSValue handlerValue = this->handler();
Note: See TracChangeset for help on using the changeset viewer.