Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: Source/WebCore/page/Frame.cpp

Issue 13686020: Make HTMLNames threadsafe (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove extra assert Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/page/Frame.cpp
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
index 71998722d1a6e8676c087c2807390e4a99abfb7e..6b07fd3221237b61da332bfcc34e4b26e4460578 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -96,6 +96,7 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/StdLibExtras.h>
+#include <wtf/text/StringStatics.h>
#include "MathMLNames.h"
#include "SVGNames.h"
@@ -137,6 +138,21 @@ static inline float parentTextZoomFactor(Frame* frame)
return parent->textZoomFactor();
}
+void init()
eseidel 2013/04/10 20:53:50 We should just move this to its own file. WebCore
abarth-chromium 2013/04/10 21:00:51 Yes. Would you mind if I do that in the next CL?
+{
+ AtomicString::init();
+ HTMLNames::init();
+ SVGNames::init();
+ XLinkNames::init();
+ MathMLNames::init();
+ XMLNSNames::init();
+ XMLNames::init();
+ WebKitFontFamilyNames::init();
+ MediaFeatureNames::init();
+ WTF::StringStatics::init();
+ QualifiedName::init();
+}
+
inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoaderClient* frameLoaderClient)
: m_page(page)
, m_treeNode(this, parentFromOwnerElement(ownerElement))
@@ -157,16 +173,7 @@ inline Frame::Frame(Page* page, HTMLFrameOwnerElement* ownerElement, FrameLoader
, m_activeDOMObjectsAndAnimationsSuspendedCount(0)
{
ASSERT(page);
- AtomicString::init();
- HTMLNames::init();
- QualifiedName::init();
- MediaFeatureNames::init();
- SVGNames::init();
- XLinkNames::init();
- MathMLNames::init();
- XMLNSNames::init();
- XMLNames::init();
- WebKitFontFamilyNames::init();
+ WebCore::init();
if (ownerElement) {
page->incrementSubframeCount();

Powered by Google App Engine
This is Rietveld 408576698