Changeset 173263 in webkit


Ignore:
Timestamp:
Sep 4, 2014 10:10:26 AM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r173245.
https://bugs.webkit.org/show_bug.cgi?id=136533

Broke JSC tests. (Requested by ddkilzer on #webkit).

Reverted changeset:

"JavaScriptCore should build with newer clang"
https://bugs.webkit.org/show_bug.cgi?id=136002
http://trac.webkit.org/changeset/173245

Location:
trunk/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSBase.cpp

    r173245 r173263  
    6161    // evaluate sets "this" to the global object if it is NULL
    6262    JSGlobalObject* globalObject = exec->vmEntryGlobalObject();
    63     SourceCode source = makeSource(script ? script->string() : String(), sourceURL ? sourceURL->string() : String(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber::first()));
     63    SourceCode source = makeSource(script->string(), sourceURL->string(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber::first()));
    6464
    6565    JSValue evaluationException;
  • trunk/Source/JavaScriptCore/API/JSScriptRef.cpp

    r173245 r173263  
    8585    startingLineNumber = std::max(1, startingLineNumber);
    8686
    87     RefPtr<OpaqueJSScript> result = OpaqueJSScript::create(vm, url ? url->string() : String(), startingLineNumber, String(StringImpl::createFromLiteral(source, length)));
     87    RefPtr<OpaqueJSScript> result = OpaqueJSScript::create(vm, url->string(), startingLineNumber, String(StringImpl::createFromLiteral(source, length)));
    8888
    8989    ParserError error;
  • trunk/Source/JavaScriptCore/API/JSStringRef.cpp

    r173245 r173263  
    7979size_t JSStringGetLength(JSStringRef string)
    8080{
    81     if (!string)
    82         return 0;
    8381    return string->length();
    8482}
     
    8684const JSChar* JSStringGetCharactersPtr(JSStringRef string)
    8785{
    88     if (!string)
    89         return nullptr;
    9086    return string->characters();
    9187}
     
    9995size_t JSStringGetUTF8CString(JSStringRef string, char* buffer, size_t bufferSize)
    10096{
    101     if (!string || !buffer || !bufferSize)
     97    if (!bufferSize)
    10298        return 0;
    10399
  • trunk/Source/JavaScriptCore/API/JSStringRefCF.cpp

    r173245 r173263  
    5858CFStringRef JSStringCopyCFString(CFAllocatorRef allocator, JSStringRef string)
    5959{
    60     if (!string || !string->length())
     60    if (!string->length())
    6161        return CFSTR("");
    6262
  • trunk/Source/JavaScriptCore/API/JSValueRef.cpp

    r173245 r173263  
    319319    JSLockHolder locker(exec);
    320320
    321     return toRef(exec, jsString(exec, string ? string->string() : String()));
     321    return toRef(exec, jsString(exec, string->string()));
    322322}
    323323
  • trunk/Source/JavaScriptCore/API/OpaqueJSString.cpp

    r173245 r173263  
    5757String OpaqueJSString::string() const
    5858{
     59    if (!this)
     60        return String();
     61
    5962    // Return a copy of the wrapped string, because the caller may make it an Identifier.
    6063    return m_string.isolatedCopy();
     
    6366Identifier OpaqueJSString::identifier(VM* vm) const
    6467{
    65     if (m_string.isNull())
     68    if (!this || m_string.isNull())
    6669        return Identifier();
    6770
     
    7780const UChar* OpaqueJSString::characters()
    7881{
     82    if (!this)
     83        return nullptr;
     84
    7985    // m_characters is put in a local here to avoid an extra atomic load.
    8086    UChar* characters = m_characters;
  • trunk/Source/JavaScriptCore/API/OpaqueJSString.h

    r173245 r173263  
    5656    JS_EXPORT_PRIVATE ~OpaqueJSString();
    5757
    58     bool is8Bit() { return m_string.is8Bit(); }
    59     const LChar* characters8() { return m_string.characters8(); }
    60     const UChar* characters16() { return m_string.characters16(); }
    61     unsigned length() { return m_string.length(); }
     58    bool is8Bit() { return this ? m_string.is8Bit() : false; }
     59    const LChar* characters8() { return this ? m_string.characters8() : nullptr; }
     60    const UChar* characters16() { return this ? m_string.characters16() : nullptr; }
     61    unsigned length() { return this ? m_string.length() : 0; }
    6262
    6363    const UChar* characters();
  • trunk/Source/JavaScriptCore/ChangeLog

    r173262 r173263  
     12014-09-04  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r173245.
     4        https://bugs.webkit.org/show_bug.cgi?id=136533
     5
     6        Broke JSC tests. (Requested by ddkilzer on #webkit).
     7
     8        Reverted changeset:
     9
     10        "JavaScriptCore should build with newer clang"
     11        https://bugs.webkit.org/show_bug.cgi?id=136002
     12        http://trac.webkit.org/changeset/173245
     13
    1142014-09-04  Brian J. Burg  <burg@cs.washington.edu>
    215
  • trunk/Source/JavaScriptCore/parser/SourceProvider.h

    r173245 r173263  
    5555        intptr_t asID()
    5656        {
     57            ASSERT(this);
     58            if (!this) // Be defensive in release mode.
     59                return nullID;
    5760            if (!m_id)
    5861                getID();
  • trunk/Source/WebKit2/ChangeLog

    r173255 r173263  
     12014-09-04  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r173245.
     4        https://bugs.webkit.org/show_bug.cgi?id=136533
     5
     6        Broke JSC tests. (Requested by ddkilzer on #webkit).
     7
     8        Reverted changeset:
     9
     10        "JavaScriptCore should build with newer clang"
     11        https://bugs.webkit.org/show_bug.cgi?id=136002
     12        http://trac.webkit.org/changeset/173245
     13
    1142014-09-04  Carlos Garcia Campos  <cgarcia@igalia.com>
    215
  • trunk/Source/WebKit2/Shared/API/c/WKString.cpp

    r173245 r173263  
    8686WKStringRef WKStringCreateWithJSString(JSStringRef jsStringRef)
    8787{
    88     RefPtr<API::String> apiString = jsStringRef ? API::String::create(jsStringRef) : API::String::createNull();
     88    RefPtr<API::String> apiString = API::String::create(jsStringRef);
    8989    return toAPI(apiString.release().leakRef());
    9090}
Note: See TracChangeset for help on using the changeset viewer.