Beispiel #1
0
void CoreInitializer::init()
{
    ASSERT(!m_isInited);
    m_isInited = true;

    HTMLNames::init();

    EventNames::init();
    EventTargetNames::init();
    EventTypeNames::init();
    FetchInitiatorTypeNames::init();
    FontFamilyNames::init();
    HTMLTokenizerNames::init();
    MediaFeatureNames::init();
    MediaTypeNames::init();

    // It would make logical sense to do this in WTF::initialize() but there are
    // ordering dependencies, e.g. about "xmlns".
    WTF::StringStatics::init();

    QualifiedName::init();
    Partitions::init();
    EventTracer::initialize();

    registerEventFactory();

    // Ensure that the main thread's thread-local data is initialized before
    // starting any worker threads.
    PlatformThreadData::current();

    StringImpl::freezeStaticStrings();

    HTMLParserThread::start();
}
Beispiel #2
0
void CoreInitializer::init()
{
    ASSERT(!m_isInited);
    m_isInited = true;

    HTMLNames::init();
    SVGNames::init();
    XLinkNames::init();
    MathMLNames::init();
    XMLNSNames::init();
    XMLNames::init();

    EventNames::init();
    EventTargetNames::init();
    EventTypeNames::init();
    FetchInitiatorTypeNames::init();
    FontFamilyNames::init();
    HTMLTokenizerNames::init();
    InputTypeNames::init();
    MediaFeatureNames::init();
    MediaTypeNames::init();

    CSSParserTokenRange::initStaticEOFToken();

    // It would make logical sense to do this in WTF::initialize() but there are
    // ordering dependencies, e.g. about "xmlns".
    WTF::StringStatics::init();

    StyleChangeExtraData::init();

    QualifiedName::init();
    Partitions::init();
    EventTracer::initialize();

    registerEventFactory();

    // Ensure that the main thread's thread-local data is initialized before
    // starting any worker threads.
    PlatformThreadData::current();

    StringImpl::freezeStaticStrings();

    // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
    // does not start the threads.
    HTMLParserThread::init();
    ScriptStreamerThread::init();
}
Beispiel #3
0
void CoreInitializer::init()
{
    if (m_isInited)
        return;
    m_isInited = true;

    // It would make logical sense to do this and WTF::StringStatics::init() in
    // WTF::initialize() but there are ordering dependencies.
    AtomicString::init();
    HTMLNames::init();
    SVGNames::init();
    XLinkNames::init();
    MathMLNames::init();
    XMLNSNames::init();
    XMLNames::init();

    initEventNames();
    initEventTargetNames();
    EventTypeNames::init();
    FetchInitiatorTypeNames::init();
    FontFamilyNames::init();
    HTMLTokenizerNames::init();
    InputTypeNames::init();
    MediaFeatureNames::init();
    MediaTypeNames::init();

    WTF::StringStatics::init();
    QualifiedName::init();
    Partitions::init();
    EventTracer::initialize();

    registerEventFactory();

    // Ensure that the main thread's thread-local data is initialized before
    // starting any worker threads.
    PlatformThreadData::current();

    StringImpl::freezeStaticStrings();

    // Creates HTMLParserThread::shared, but does not start the thread.
    HTMLParserThread::init();
}
Beispiel #4
0
void CoreInitializer::initialize() {
  ASSERT(!isInitialized());
  m_isInitialized = true;
  // Note: in order to add core static strings for a new module (1)
  // the value of 'coreStaticStringsCount' must be updated with the
  // added strings count, (2) if the added strings are quialified names
  // the 'qualifiedNamesCount' must be updated as well, (3) the strings
  // 'init()' function call must be added.
  // TODO([email protected]): We should generate static strings
  // initialization code.
  const unsigned qualifiedNamesCount =
      HTMLNames::HTMLTagsCount + HTMLNames::HTMLAttrsCount +
      MathMLNames::MathMLTagsCount + MathMLNames::MathMLAttrsCount +
      SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount +
      XLinkNames::XLinkAttrsCount + XMLNSNames::XMLNSAttrsCount +
      XMLNames::XMLAttrsCount;

  const unsigned coreStaticStringsCount =
      qualifiedNamesCount + EventNames::EventNamesCount +
      EventTargetNames::EventTargetNamesCount +
      EventTypeNames::EventTypeNamesCount +
      FetchInitiatorTypeNames::FetchInitiatorTypeNamesCount +
      FontFamilyNames::FontFamilyNamesCount +
      HTMLTokenizerNames::HTMLTokenizerNamesCount + HTTPNames::HTTPNamesCount +
      InputModeNames::InputModeNamesCount +
      InputTypeNames::InputTypeNamesCount +
      MediaFeatureNames::MediaFeatureNamesCount +
      MediaTypeNames::MediaTypeNamesCount;

  StringImpl::reserveStaticStringsCapacityForSize(
      coreStaticStringsCount + StringImpl::allStaticStrings().size());
  QualifiedName::initAndReserveCapacityForSize(qualifiedNamesCount);

  AtomicStringTable::instance().reserveCapacity(coreStaticStringsCount);

  HTMLNames::init();
  SVGNames::init();
  XLinkNames::init();
  MathMLNames::init();
  XMLNSNames::init();
  XMLNames::init();

  EventNames::init();
  EventTargetNames::init();
  EventTypeNames::init();
  FetchInitiatorTypeNames::init();
  FontFamilyNames::init();
  HTMLTokenizerNames::init();
  HTTPNames::init();
  InputModeNames::init();
  InputTypeNames::init();
  MediaFeatureNames::init();
  MediaTypeNames::init();

  MediaQueryEvaluator::init();
  CSSParserTokenRange::initStaticEOFToken();

  StyleChangeExtraData::init();

  KURL::initialize();
  SchemeRegistry::initialize();
  SecurityPolicy::init();

  registerEventFactory();

  StringImpl::freezeStaticStrings();

  // Creates HTMLParserThread::shared and ScriptStreamerThread::shared, but
  // does not start the threads.
  if (!RuntimeEnabledFeatures::parseHTMLOnMainThreadEnabled())
    HTMLParserThread::init();
  ScriptStreamerThread::init();
}