Changeset 233987 in webkit


Ignore:
Timestamp:
Jul 19, 2018 10:06:38 AM (6 years ago)
Author:
Yusuke Suzuki
Message:

Unreviewed, check scope after performing getPropertySlot in JSON.stringify
https://bugs.webkit.org/show_bug.cgi?id=187807

Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
that we know that exception occurrence and handle it well.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Holder::appendNextProperty):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r233937 r233987  
     12018-07-19  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        Unreviewed, check scope after performing getPropertySlot in JSON.stringify
     4        https://bugs.webkit.org/show_bug.cgi?id=187807
     5
     6        Properly putting EXCEPTION_ASSERT to tell our exception checker mechanism
     7        that we know that exception occurrence and handle it well.
     8
     9        * runtime/JSONObject.cpp:
     10        (JSC::Stringifier::Holder::appendNextProperty):
     11
    1122018-07-18  Yusuke Suzuki  <utatane.tea@gmail.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r233924 r233987  
    515515        else {
    516516            PropertySlot slot(m_object, PropertySlot::InternalMethodType::Get);
    517             if (m_object->getPropertySlot(exec, index, slot))
     517            bool hasProperty = m_object->getPropertySlot(exec, index, slot);
     518            EXCEPTION_ASSERT(!scope.exception() || !hasProperty);
     519            if (hasProperty)
    518520                value = slot.getValue(exec, index);
    519521            else
     
    534536        PropertySlot slot(m_object, PropertySlot::InternalMethodType::Get);
    535537        Identifier& propertyName = m_propertyNames->propertyNameVector()[index];
    536         if (!m_object->getPropertySlot(exec, propertyName, slot))
     538        bool hasProperty = m_object->getPropertySlot(exec, propertyName, slot);
     539        EXCEPTION_ASSERT(!scope.exception() || !hasProperty);
     540        if (!hasProperty)
    537541            return true;
    538542        JSValue value = slot.getValue(exec, propertyName);
Note: See TracChangeset for help on using the changeset viewer.