Ignore:
Timestamp:
Aug 2, 2013, 3:30:48 PM (12 years ago)
Author:
[email protected]
Message:

Remove no-arguments constructor to PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119460

Reviewed by Geoff Garen.

This constructor was unsafe if getValue is subsequently called,
and the property is a getter. Simplest to just remove it.

  • runtime/Arguments.cpp:

(JSC::Arguments::defineOwnProperty):

  • runtime/JSActivation.cpp:

(JSC::JSActivation::getOwnPropertyDescriptor):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::getOwnPropertyDescriptor):
(JSC::JSFunction::getOwnNonIndexPropertyNames):
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::defineOwnProperty):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::hasOwnPropertyForWrite):

  • runtime/JSNameScope.cpp:

(JSC::JSNameScope::put):

  • runtime/JSONObject.cpp:

(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):

  • runtime/JSObject.cpp:

(JSC::JSObject::hasProperty):
(JSC::JSObject::hasOwnProperty):
(JSC::JSObject::reifyStaticFunctionsForDelete):

  • runtime/Lookup.h:

(JSC::getStaticPropertyDescriptor):
(JSC::getStaticFunctionDescriptor):
(JSC::getStaticValueDescriptor):

  • runtime/ObjectConstructor.cpp:

(JSC::defineProperties):

  • runtime/PropertySlot.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r153532 r153673  
    516516        else {
    517517            PropertySlot slot(m_object.get());
    518             if (!m_object->methodTable()->getOwnPropertySlotByIndex(m_object.get(), exec, index, slot))
    519                 slot.setUndefined();
    520             if (exec->hadException())
    521                 return false;
    522             value = slot.getValue(exec, index);
     518            if (m_object->methodTable()->getOwnPropertySlotByIndex(m_object.get(), exec, index, slot)) {
     519                value = slot.getValue(exec, index);
     520                if (exec->hadException())
     521                    return false;
     522            } else
     523                value = jsUndefined();
    523524        }
    524525
     
    671672                    inValue = array->getIndexQuickly(index);
    672673                else {
    673                     PropertySlot slot;
     674                    PropertySlot slot(array);
    674675                    if (array->methodTable()->getOwnPropertySlotByIndex(array, m_exec, index, slot))
    675676                        inValue = slot.getValue(m_exec, index);
     
    723724                    break;
    724725                }
    725                 PropertySlot slot;
     726                PropertySlot slot(object);
    726727                if (object->methodTable()->getOwnPropertySlot(object, m_exec, properties[index], slot))
    727728                    inValue = slot.getValue(m_exec, properties[index]);
Note: See TracChangeset for help on using the changeset viewer.