Ignore:
Timestamp:
Apr 3, 2010, 11:53:46 PM (15 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=37068
Change UString to use a 0 rep for null strings instead of a null object.

Reviewed by Oliver Hunt.

No performance impact.

(JSC::InternalFunction::InternalFunction):

  • runtime/JSString.h:

(JSC::RopeBuilder::JSString):

  • runtime/UString.cpp:

(JSC::initializeUString):

  • runtime/UString.h:

(JSC::UString::UString):
(JSC::UString::data):
(JSC::UString::size):
(JSC::UString::isNull):
(JSC::UString::isEmpty):
(JSC::UString::cost):

File:
1 edited

Legend:

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

    r57019 r57055  
    117117            , m_fiberCount(0)
    118118        {
     119            ASSERT(!m_value.isNull());
    119120            Heap::heap(this)->reportExtraMemoryCost(value.cost());
    120121        }
     
    127128            , m_fiberCount(0)
    128129        {
     130            ASSERT(!m_value.isNull());
    129131        }
    130132        JSString(JSGlobalData* globalData, PassRefPtr<UString::Rep> value, HasOtherOwnerType)
     
    134136            , m_fiberCount(0)
    135137        {
     138            ASSERT(!m_value.isNull());
    136139        }
    137140        JSString(JSGlobalData* globalData, PassRefPtr<Rope> rope)
     
    203206            , m_fiberCount(0)
    204207        {
     208            ASSERT(!m_value.isNull());
    205209            // nasty hack because we can't union non-POD types
    206210            m_other.m_finalizerCallback = finalizer;
Note: See TracChangeset for help on using the changeset viewer.