Chromium Code Reviews| Index: third_party/WebKit/Source/core/Init.cpp |
| diff --git a/third_party/WebKit/Source/core/Init.cpp b/third_party/WebKit/Source/core/Init.cpp |
| index 1576624f3cc92f5dd3eb838cbed00ca14ecfa38f..b2cde4e00e30110718a92e283674d663c222675f 100644 |
| --- a/third_party/WebKit/Source/core/Init.cpp |
| +++ b/third_party/WebKit/Source/core/Init.cpp |
| @@ -76,6 +76,33 @@ void CoreInitializer::init() |
| { |
| ASSERT(!m_isInited); |
| m_isInited = 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: We should generate static strings initialization code. |
|
tkent
2015/09/28 00:11:17
TODO needs your name.
TODO(mikhail.pozdnyakov@in
Mikhail
2015/09/28 08:39:34
Done.
|
| + const unsigned qualifiedNamesCount = HTMLNames::HTMLTagsCount + HTMLNames::HTMLAttrsCount |
| + + MathMLNames::MathMLTagsCount + MathMLNames::MathMLAttrsCount |
| + + SVGNames::SVGTagsCount + SVGNames::SVGAttrsCount |
| + + XLinkNames::XLinkAttrsCount |
| + + XMLNSNames::XMLNSAttrsCount |
| + + XMLNames::XMLAttrsCount; |
| + |
| + QualifiedName::initAndReserveCapacityForSize(qualifiedNamesCount); |
| + |
| + const unsigned coreStaticStringsCount = qualifiedNamesCount |
| + + EventNames::EventNamesCount |
| + + EventTargetNames::EventTargetNamesCount |
| + + EventTypeNames::EventTypeNamesCount |
| + + FetchInitiatorTypeNames::FetchInitiatorTypeNamesCount |
| + + FontFamilyNames::FontFamilyNamesCount |
| + + HTMLTokenizerNames::HTMLTokenizerNamesCount |
| + + InputTypeNames::InputTypeNamesCount |
| + + MediaFeatureNames::MediaFeatureNamesCount |
| + + MediaTypeNames::MediaTypeNamesCount; |
| + |
| + StringImpl::reserveStaticStringsCapacityForSize(coreStaticStringsCount + StringImpl::allStaticStrings().size()); |
| HTMLNames::init(); |
| SVGNames::init(); |
| @@ -103,7 +130,6 @@ void CoreInitializer::init() |
| StyleChangeExtraData::init(); |
| - QualifiedName::init(); |
| EventTracer::initialize(); |
| KURL::initialize(); |
| SecurityPolicy::init(); |