Changeset 202124 in webkit


Ignore:
Timestamp:
Jun 15, 2016 9:41:18 PM (8 years ago)
Author:
mark.lam@apple.com
Message:

Assertion failure when returning incomplete property descriptor from proxy trap.
https://bugs.webkit.org/show_bug.cgi?id=157078

Reviewed by Saam Barati.

If the proxy returns a descriptor that expects a value but does not specify one,
we should use undefined for the value.

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performInternalMethodGetOwnProperty):

  • tests/stress/proxy-returning-incomplete-property-descriptor.js: Added.

(truthiness):
(compare):
(shouldBe):
(test):
(get test):

Location:
trunk/Source/JavaScriptCore
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r202113 r202124  
     12016-06-15  Mark Lam  <mark.lam@apple.com>
     2
     3        Assertion failure when returning incomplete property descriptor from proxy trap.
     4        https://bugs.webkit.org/show_bug.cgi?id=157078
     5
     6        Reviewed by Saam Barati.
     7
     8        If the proxy returns a descriptor that expects a value but does not specify one,
     9        we should use undefined for the value.
     10
     11        * runtime/ProxyObject.cpp:
     12        (JSC::ProxyObject::performInternalMethodGetOwnProperty):
     13        * tests/stress/proxy-returning-incomplete-property-descriptor.js: Added.
     14        (truthiness):
     15        (compare):
     16        (shouldBe):
     17        (test):
     18        (get test):
     19
    1202016-06-15  Keith Miller  <keith_miller@apple.com>
    221
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp

    r201703 r202124  
    263263            return false;
    264264        slot.setGetterSlot(this, trapResultAsDescriptor.attributes(), getterSetter);
    265     } else if (trapResultAsDescriptor.isDataDescriptor())
     265    } else if (trapResultAsDescriptor.isDataDescriptor() && !trapResultAsDescriptor.value().isEmpty())
    266266        slot.setValue(this, trapResultAsDescriptor.attributes(), trapResultAsDescriptor.value());
    267267    else
Note: See TracChangeset for help on using the changeset viewer.