Ignore:
Timestamp:
May 11, 2010, 2:35:39 PM (15 years ago)
Author:
[email protected]
Message:

2010-05-11 Sheriff Bot <[email protected]>

Unreviewed, rolling out r59171.
http://trac.webkit.org/changeset/59171
https://bugs.webkit.org/show_bug.cgi?id=38933

"Broke the world" (Requested by bweinstein on #webkit).

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
  • JavaScriptCore.vcproj/WTF/WTF.vcproj:
  • JavaScriptCore.vcproj/jsc/jsc.vcproj:
  • JavaScriptCore.vcproj/jsc/jscCommon.vsprops:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • wtf/text/AtomicString.cpp: (WebCore::AtomicString::init):
  • wtf/text/StringImpl.cpp: (WebCore::StringImpl::empty):
  • wtf/text/StringStatics.cpp: Removed.

2010-05-11 Sheriff Bot <[email protected]>

Unreviewed, rolling out r59171.
http://trac.webkit.org/changeset/59171
https://bugs.webkit.org/show_bug.cgi?id=38933

"Broke the world" (Requested by bweinstein on #webkit).

  • WebCore.vcproj/WebCore.vcproj:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/text/AtomicString.cpp

    r59171 r59172  
    2121#include "config.h"
    2222
     23#ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
     24#define ATOMICSTRING_HIDE_GLOBALS 1
     25#endif
     26
    2327#include "AtomicString.h"
    2428
     29#include "StaticConstructors.h"
    2530#include "StringHash.h"
    2631#include <wtf/HashSet.h>
     
    295300}
    296301
    297 }
     302JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, nullAtom)
     303JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, emptyAtom, "")
     304JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, textAtom, "#text")
     305JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, commentAtom, "#comment")
     306JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, starAtom, "*")
     307JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, xmlAtom, "xml")
     308JS_EXPORTDATA DEFINE_GLOBAL(AtomicString, xmlnsAtom, "xmlns")
     309
     310void AtomicString::init()
     311{
     312    static bool initialized;
     313    if (!initialized) {
     314        // Initialization is not thread safe, so this function must be called from the main thread first.
     315        ASSERT(isMainThread());
     316
     317        // Use placement new to initialize the globals.
     318        new ((void*)&nullAtom) AtomicString;
     319        new ((void*)&emptyAtom) AtomicString("");
     320        new ((void*)&textAtom) AtomicString("#text");
     321        new ((void*)&commentAtom) AtomicString("#comment");
     322        new ((void*)&starAtom) AtomicString("*");
     323        new ((void*)&xmlAtom) AtomicString("xml");
     324        new ((void*)&xmlnsAtom) AtomicString("xmlns");
     325
     326        initialized = true;
     327    }
     328}
     329
     330}
Note: See TracChangeset for help on using the changeset viewer.