Ignore:
Timestamp:
Aug 4, 2010, 3:21:13 PM (15 years ago)
Author:
[email protected]
Message:

2010-08-04 Sheriff Bot <[email protected]>

Unreviewed, rolling out r64655.
http://trac.webkit.org/changeset/64655
https://bugs.webkit.org/show_bug.cgi?id=43496

JavaScriptCore references patch seems to have caused
regressions in QT and GTK builds (Requested by nlawrence on
#webkit).

  • bytecode/CodeBlock.cpp: (JSC::CodeBlock::markAggregate):
  • runtime/Collector.cpp: (JSC::Heap::markConservatively):
  • runtime/JSCell.h: (JSC::JSValue::asCell): (JSC::MarkStack::append):
  • runtime/JSGlobalObject.cpp: (JSC::markIfNeeded):
  • runtime/JSONObject.cpp: (JSC::Stringifier::Holder::object):
  • runtime/JSObject.h: (JSC::JSObject::prototype):
  • runtime/JSStaticScopeObject.cpp: (JSC::JSStaticScopeObject::markChildren):
  • runtime/JSValue.h: (JSC::JSValue::): (JSC::JSValue::JSValue): (JSC::JSValue::asCell):
  • runtime/MarkStack.h:
  • runtime/NativeErrorConstructor.cpp:
  • runtime/NativeErrorConstructor.h:
  • runtime/Structure.h: (JSC::Structure::storedPrototype):

2010-08-04 Sheriff Bot <[email protected]>

Unreviewed, rolling out r64655.
http://trac.webkit.org/changeset/64655
https://bugs.webkit.org/show_bug.cgi?id=43496

JavaScriptCore references patch seems to have caused
regressions in QT and GTK builds (Requested by nlawrence on
#webkit).

  • JSValueWrapper.cpp: (JSValueWrapper::JSObjectMark):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSCell.h

    r64655 r64684  
    3636
    3737    class JSCell : public NoncopyableCustomAllocated {
    38         friend class CollectorHeap;
    3938        friend class GetterSetter;
    4039        friend class Heap;
     
    239238
    240239#if !USE(JSVALUE32_64)
    241     ALWAYS_INLINE JSCell*& JSValue::asCell()
    242     {
    243         ASSERT(isCell());
    244         return m_ptr;
    245     }
    246 
    247     ALWAYS_INLINE JSCell* const& JSValue::asCell() const
     240    ALWAYS_INLINE JSCell* JSValue::asCell() const
    248241    {
    249242        ASSERT(isCell());
     
    337330    }
    338331
    339     template<typename T>
    340     ALWAYS_INLINE void MarkStack::append(T*& cell)
    341     {
    342         // References in C++ are not covariant.  JSObject* being a subtype of JSCell*
    343         // does not mean that JSObject*& can be used as a subtype of JSCell*& because
    344         // treating a JSObject*& as a JSCell*& would allow us to change the pointer to
    345         // point to something that is a JSCell but not a JSObject.
    346         //
    347         // In this case, we need to be able to change the pointer, and although we know
    348         // it to be safe, C++ doesn't, requiring us to use templated functions that
    349         // pass a casted version to an internal function.
    350         //
    351         // Currently we're not doing anything with the value of the pointer, so nothing
    352         // unsafe will happen.  In the future, when we have movable objects, we will be
    353         // changing the value of the pointer to be the new location, in which case the
    354         // type will be preserved.
    355         JSCell*& ptr = *reinterpret_cast<JSCell**>(&cell);
    356         appendInternal(ptr);
    357     }
    358 
    359     ALWAYS_INLINE void MarkStack::append(JSValue& value)
    360     {
    361         ASSERT(value);
    362         if (value.isCell())
    363             appendInternal(value.asCell());
    364     }
    365 
    366     ALWAYS_INLINE void MarkStack::append(Register& reg)
    367     {
    368         JSValue value = reg.jsValue();
    369         append(value);
    370         reg = value;
    371     }
    372 
    373     inline void MarkStack::appendInternal(JSCell*& cell)
     332    ALWAYS_INLINE void MarkStack::append(JSCell* cell)
    374333    {
    375334        ASSERT(!m_isCheckingForDefaultMarkViolation);
     
    382341    }
    383342
     343    ALWAYS_INLINE void MarkStack::append(JSValue value)
     344    {
     345        ASSERT(value);
     346        if (value.isCell())
     347            append(value.asCell());
     348    }
     349
    384350    inline Heap* Heap::heap(JSValue v)
    385351    {
Note: See TracChangeset for help on using the changeset viewer.