Ignore:
Timestamp:
Aug 12, 2010, 11:42:16 PM (15 years ago)
Author:
Csaba Osztrogonác
Message:

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

Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950

It broke 4 sputnik tests (Requested by Ossy on #webkit).

  • JavaScriptCore.exp:
  • bytecode/CodeBlock.cpp: (JSC::constantName): (JSC::idName): (JSC::CodeBlock::registerName): (JSC::regexpName): (JSC::printGlobalResolveInfo): (JSC::printStructureStubInfo): (JSC::CodeBlock::printStructure): (JSC::CodeBlock::printStructures):
  • jsc.cpp: (functionPrint): (functionDebug): (runInteractive): (fillBufferWithContentsOfFile):
  • pcre/pcre_exec.cpp: (Histogram::~Histogram):
  • profiler/CallIdentifier.h: (JSC::CallIdentifier::c_str):
  • profiler/Profile.cpp: (JSC::Profile::debugPrintDataSampleStyle):
  • profiler/ProfileGenerator.cpp: (JSC::ProfileGenerator::willExecute): (JSC::ProfileGenerator::didExecute):
  • profiler/ProfileNode.cpp: (JSC::ProfileNode::debugPrintData): (JSC::ProfileNode::debugPrintDataSampleStyle):
  • runtime/Arguments.cpp: (JSC::Arguments::getOwnPropertySlot): (JSC::Arguments::getOwnPropertyDescriptor): (JSC::Arguments::put): (JSC::Arguments::deleteProperty):
  • runtime/DateConversion.cpp: (JSC::parseDate):
  • runtime/Identifier.h: (JSC::Identifier::Identifier): (JSC::Identifier::toArrayIndex):
  • runtime/JSArray.cpp: (JSC::JSArray::getOwnPropertySlot): (JSC::JSArray::getOwnPropertyDescriptor): (JSC::JSArray::put): (JSC::JSArray::deleteProperty):
  • runtime/JSArray.h:
  • runtime/JSGlobalObjectFunctions.cpp: (JSC::encode): (JSC::parseInt): (JSC::globalFuncJSCPrint):
  • runtime/JSString.h: (JSC::RopeBuilder::JSString):
  • runtime/UString.cpp: (JSC::UString::toDouble): (JSC::UString::UTF8String):
  • runtime/UString.h: (JSC::UString::isNull): (JSC::UString::isEmpty): (JSC::UString::impl): (JSC::UString::cost): (JSC::UString::~UString): (JSC::UString::toArrayIndex):
  • wtf/text/WTFString.cpp: (WTF::String::utf8):
  • wtf/text/WTFString.h: (WTF::String::String): (WTF::String::isHashTableDeletedValue): (WTF::String::length): (WTF::String::operator[]): (WTF::String::isNull): (WTF::String::isEmpty): (WTF::String::impl):

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

Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950

It broke 4 sputnik tests (Requested by Ossy on #webkit).

  • WebFrame.cpp: (wxWebFrame::RunScript):

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

Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950

It broke 4 sputnik tests (Requested by Ossy on #webkit).

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::enumerate):

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

Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950

It broke 4 sputnik tests (Requested by Ossy on #webkit).

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::getOwnPropertySlot): (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
  • bridge/NP_jsobject.cpp: (_NPN_Enumerate):
  • bridge/c/c_utility.cpp: (JSC::Bindings::convertValueToNPVariant):
  • bridge/jni/JNIBridge.cpp: (JavaParameter::JavaParameter): (JavaMethod::JavaMethod): (JavaMethod::signature): (JavaMethod::methodID):
  • bridge/jni/JNIBridge.h: (JSC::Bindings::JavaString::UTF8String): (JSC::Bindings::JavaParameter::type): (JSC::Bindings::JavaMethod::returnType):
  • bridge/jni/jni_jsobject.mm: (JavaJSObject::call): (JavaJSObject::eval): (JavaJSObject::getMember): (JavaJSObject::setMember): (JavaJSObject::removeMember): (JavaJSObject::convertJObjectToValue):
  • bridge/jni/jsc/JNIBridgeJSC.cpp: (JavaField::JavaField): (JavaField::valueFromInstance): (JavaField::setValueToInstance):
  • bridge/jni/jsc/JNIBridgeJSC.h: (JSC::Bindings::JavaField::type):
  • bridge/jni/jsc/JavaInstanceJSC.cpp: (JavaInstance::invokeMethod):
  • bridge/jni/jsc/JavaStringJSC.h: (JSC::Bindings::JavaStringImpl::UTF8String):
  • bridge/runtime_array.cpp: (JSC::RuntimeArray::getOwnPropertySlot): (JSC::RuntimeArray::getOwnPropertyDescriptor): (JSC::RuntimeArray::put):

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

Unreviewed, rolling out r65295.
http://trac.webkit.org/changeset/65295
https://bugs.webkit.org/show_bug.cgi?id=43950

It broke 4 sputnik tests (Requested by Ossy on #webkit).

  • WebProcess/Plugins/JSNPObject.cpp: (WebKit::npIdentifierFromIdentifier):
  • WebProcess/Plugins/NPJSObject.cpp: (WebKit::NPJSObject::enumerate):
  • WebProcess/Plugins/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
File:
1 edited

Legend:

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

    r65295 r65302  
    3939namespace JSC {
    4040
     41using WTF::PlacementNewAdoptType;
     42using WTF::PlacementNewAdopt;
     43
    4144class UString {
    4245public:
     
    6164    UString(RefPtr<StringImpl> impl) : m_impl(impl) { }
    6265
    63     // Inline the destructor.
    64     ALWAYS_INLINE ~UString() { }
    65 
    6666    void swap(UString& o) { m_impl.swap(o.m_impl); }
    6767
     
    6969    static UString adopt(Vector<UChar, inlineCapacity>& vector) { return StringImpl::adopt(vector); }
    7070
    71     bool isNull() const { return !m_impl; }
    72     bool isEmpty() const { return !m_impl || !m_impl->length(); }
    73 
    74     StringImpl* impl() const { return m_impl.get(); }
    75 
    76     unsigned length() const
    77     {
    78         if (!m_impl)
    79             return 0;
    80         return m_impl->length();
    81     }
    82 
    83     const UChar* characters() const
    84     {
    85         if (!m_impl)
    86             return 0;
    87         return m_impl->characters();
    88     }
    89 
    90     CString utf8(bool strict = false) const;
    91 
    92     UChar operator[](unsigned index) const
    93     {
    94         if (!m_impl || index >= m_impl->length())
    95             return 0;
    96         return m_impl->characters()[index];
    97     }
    98 
    9971    static UString number(int);
     72    static UString number(long long);
    10073    static UString number(unsigned);
    10174    static UString number(long);
    102     static UString number(long long);
    10375    static UString number(double);
    10476
    105 
     77    // NOTE: This method should only be used for *debugging* purposes as it
     78    // is neither Unicode safe nor free from side effects nor thread-safe.
     79    char* ascii() const;
     80
     81    /**
     82     * Convert the string to UTF-8, assuming it is UTF-16 encoded.
     83     * In non-strict mode, this function is tolerant of badly formed UTF-16, it
     84     * can create UTF-8 strings that are invalid because they have characters in
     85     * the range U+D800-U+DDFF, U+FFFE, or U+FFFF, but the UTF-8 string is
     86     * guaranteed to be otherwise valid.
     87     * In strict mode, error is returned as null CString.
     88     */
     89    CString UTF8String(bool strict = false) const;
     90
     91    unsigned length() const
     92    {
     93        if (!m_impl)
     94            return 0;
     95        return m_impl->length();
     96    }
     97
     98    const UChar* characters() const
     99    {
     100        if (!m_impl)
     101            return 0;
     102        return m_impl->characters();
     103    }
     104
     105    UChar operator[](unsigned index) const
     106    {
     107        if (!m_impl || index >= m_impl->length())
     108            return 0;
     109        return m_impl->characters()[index];
     110    }
    106111
    107112    double toDouble(bool tolerateTrailingJunk, bool tolerateEmptyString) const;
     
    112117    uint32_t toUInt32(bool* ok, bool tolerateEmptyString) const;
    113118    uint32_t toStrictUInt32(bool* ok = 0) const;
     119
     120    unsigned toArrayIndex(bool* ok = 0) const;
    114121
    115122    static const unsigned NotFound = 0xFFFFFFFFu;
     
    121128    UString substr(unsigned pos = 0, unsigned len = 0xFFFFFFFF) const;
    122129
    123     // NOTE: This method should only be used for *debugging* purposes as it
    124     // is neither Unicode safe nor free from side effects nor thread-safe.
    125     char* ascii() const;
    126 
     130    bool isNull() const { return !m_impl; }
     131    bool isEmpty() const { return !m_impl || !m_impl->length(); }
     132
     133    StringImpl* impl() const { return m_impl.get(); }
     134
     135    size_t cost() const
     136    {
     137        if (!m_impl)
     138            return 0;
     139        return m_impl->cost();
     140    }
     141
     142    ALWAYS_INLINE ~UString() { }
    127143private:
    128144    RefPtr<StringImpl> m_impl;
     
    202218}
    203219
     220// Rule from ECMA 15.2 about what an array index is.
     221// Must exactly match string form of an unsigned integer, and be less than 2^32 - 1.
     222inline unsigned UString::toArrayIndex(bool* ok) const
     223{
     224    unsigned i = toStrictUInt32(ok);
     225    if (ok && i >= 0xFFFFFFFFU)
     226        *ok = false;
     227    return i;
     228}
     229
    204230// We'd rather not do shared substring append for small strings, since
    205231// this runs too much risk of a tiny initial string holding down a
Note: See TracChangeset for help on using the changeset viewer.