Changeset 77151 in webkit for trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
- Timestamp:
- Jan 31, 2011, 12:07:21 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r77113 r77151 85 85 Holder(JSObject*); 86 86 87 JSObject* object() const { return m_object; } 87 JSObject* object() const { return m_object.get(); } 88 DeprecatedPtr<JSObject>* objectSlot() { return &m_object; } 88 89 89 90 bool appendNextProperty(Stringifier&, UStringBuilder&); 90 91 91 92 private: 92 JSObject* constm_object;93 DeprecatedPtr<JSObject> m_object; 93 94 const bool m_isArray; 94 95 bool m_isJSArray; … … 259 260 size_t size = m_holderStack.size(); 260 261 for (size_t i = 0; i < size; ++i) 261 markStack.append(m_holderStack[i].object ());262 markStack.append(m_holderStack[i].objectSlot()); 262 263 } 263 264 } … … 270 271 271 272 PropertyNameForFunctionCall emptyPropertyName(m_exec->globalData().propertyNames->emptyIdentifier); 272 object->putDirect(m_exec->globalData() .propertyNames->emptyIdentifier, value);273 object->putDirect(m_exec->globalData(), m_exec->globalData().propertyNames->emptyIdentifier, value); 273 274 274 275 UStringBuilder result; … … 500 501 if (!m_index) { 501 502 if (m_isArray) { 502 m_isJSArray = isJSArray(&exec->globalData(), m_object );503 m_isJSArray = isJSArray(&exec->globalData(), m_object.get()); 503 504 m_size = m_object->get(exec, exec->globalData().propertyNames->length).toUInt32(exec); 504 505 builder.append('['); … … 533 534 // Get the value. 534 535 JSValue value; 535 if (m_isJSArray && asArray(m_object )->canGetIndex(index))536 value = asArray(m_object )->getIndex(index);536 if (m_isJSArray && asArray(m_object.get())->canGetIndex(index)) 537 value = asArray(m_object.get())->getIndex(index); 537 538 else { 538 PropertySlot slot(m_object );539 PropertySlot slot(m_object.get()); 539 540 if (!m_object->getOwnPropertySlot(exec, index, slot)) 540 541 slot.setUndefined(); … … 550 551 551 552 // Append the stringified value. 552 stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object , index);553 stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object.get(), index); 553 554 } else { 554 555 // Get the value. 555 PropertySlot slot(m_object );556 PropertySlot slot(m_object.get()); 556 557 Identifier& propertyName = m_propertyNames->propertyNameVector()[index]; 557 558 if (!m_object->getOwnPropertySlot(exec, propertyName, slot)) … … 575 576 576 577 // Append the stringified value. 577 stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object , propertyName);578 stringifyResult = stringifier.appendStringifiedValue(builder, value, m_object.get(), propertyName); 578 579 } 579 580 … … 642 643 JSValue args[] = { property, unfiltered }; 643 644 ArgList argList(args, 2); 644 return call(m_exec, m_function , m_callType, m_callData, thisObj, argList);645 return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, argList); 645 646 } 646 647 … … 648 649 649 650 ExecState* m_exec; 650 JSObject*m_function;651 DeprecatedPtr<JSObject> m_function; 651 652 CallType m_callType; 652 653 CallData m_callData; … … 727 728 else { 728 729 if (isJSArray(&m_exec->globalData(), array) && array->canSetIndex(indexStack.last())) 729 array->setIndex( indexStack.last(), filteredValue);730 array->setIndex(m_exec->globalData(), indexStack.last(), filteredValue); 730 731 else 731 732 array->put(m_exec, indexStack.last(), filteredValue);
Note:
See TracChangeset
for help on using the changeset viewer.