Title: [220106] trunk/Source/WebCore
Revision
220106
Author
[email protected]
Date
2017-08-01 11:50:45 -0700 (Tue, 01 Aug 2017)

Log Message

Unreviewed, rolling out r220089.

This caused multiple crashes on macOS Debug testers.

Reverted changeset:

"Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
QualifiedName"
https://bugs.webkit.org/show_bug.cgi?id=175010
http://trac.webkit.org/changeset/220089

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (220105 => 220106)


--- trunk/Source/WebCore/ChangeLog	2017-08-01 18:18:03 UTC (rev 220105)
+++ trunk/Source/WebCore/ChangeLog	2017-08-01 18:50:45 UTC (rev 220106)
@@ -1,3 +1,16 @@
+2017-08-01  Matt Lewis  <[email protected]>
+
+        Unreviewed, rolling out r220089.
+
+        This caused multiple crashes on macOS Debug testers.
+
+        Reverted changeset:
+
+        "Use LazyNeverDestroyed instead of DEFINE_GLOBAL for
+        QualifiedName"
+        https://bugs.webkit.org/show_bug.cgi?id=175010
+        http://trac.webkit.org/changeset/220089
+
 2017-08-01  Sam Weinig  <[email protected]>
 
         [WebIDL] Swap a custom attribute for a custom mark function for HTMLTemplateElement

Modified: trunk/Source/WebCore/dom/DOMAllInOne.cpp (220105 => 220106)


--- trunk/Source/WebCore/dom/DOMAllInOne.cpp	2017-08-01 18:18:03 UTC (rev 220105)
+++ trunk/Source/WebCore/dom/DOMAllInOne.cpp	2017-08-01 18:50:45 UTC (rev 220106)
@@ -118,7 +118,9 @@
 #include "ProcessingInstruction.cpp"
 #include "ProgressEvent.cpp"
 #include "PseudoElement.cpp"
-#include "QualifiedName.cpp"
+// Build error if adding QualifiedName.cpp to DOMAllInOne.cpp
+// https://bugs.webkit.org/show_bug.cgi?id=146586
+// #include "QualifiedName.cpp"
 #include "RadioButtonGroups.cpp"
 #include "Range.cpp"
 #include "RejectedPromiseTracker.cpp"

Modified: trunk/Source/WebCore/dom/QualifiedName.cpp (220105 => 220106)


--- trunk/Source/WebCore/dom/QualifiedName.cpp	2017-08-01 18:18:03 UTC (rev 220105)
+++ trunk/Source/WebCore/dom/QualifiedName.cpp	2017-08-01 18:50:45 UTC (rev 220106)
@@ -18,11 +18,19 @@
  */
 
 #include "config.h"
+
+#ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
+#define WEBCORE_QUALIFIEDNAME_HIDE_GLOBALS 1
+#else
+#define QNAME_DEFAULT_CONSTRUCTOR
+#endif
+
 #include "QualifiedName.h"
-
 #include "QualifiedNameCache.h"
 #include "ThreadGlobalData.h"
 #include <wtf/Assertions.h>
+#include <wtf/NeverDestroyed.h>
+#include <wtf/StaticConstructors.h>
 
 namespace WebCore {
 
@@ -37,7 +45,7 @@
 }
 
 // Global init routines
-LazyNeverDestroyed<const QualifiedName> anyName;
+DEFINE_GLOBAL(QualifiedName, anyName, nullAtom(), starAtom(), starAtom())
 
 void QualifiedName::init()
 {
@@ -45,8 +53,9 @@
     if (initialized)
         return;
 
+    // Use placement new to initialize the globals.
     AtomicString::init();
-    anyName.construct(nullAtom(), starAtom(), starAtom());
+    new (NotNull, (void*)&anyName) QualifiedName(nullAtom(), starAtom(), starAtom());
     initialized = true;
 }
 

Modified: trunk/Source/WebCore/dom/QualifiedName.h (220105 => 220106)


--- trunk/Source/WebCore/dom/QualifiedName.h	2017-08-01 18:18:03 UTC (rev 220105)
+++ trunk/Source/WebCore/dom/QualifiedName.h	2017-08-01 18:50:45 UTC (rev 220106)
@@ -21,7 +21,6 @@
 #pragma once
 
 #include <wtf/HashTraits.h>
-#include <wtf/NeverDestroyed.h>
 #include <wtf/text/AtomicString.h>
 
 namespace WebCore {
@@ -105,8 +104,10 @@
     RefPtr<QualifiedNameImpl> m_impl;
 };
 
-extern LazyNeverDestroyed<const QualifiedName> anyName;
+#ifndef WEBCORE_QUALIFIEDNAME_HIDE_GLOBALS
+extern const QualifiedName anyName;
 inline const QualifiedName& anyQName() { return anyName; }
+#endif
 
 const QualifiedName& nullQName();
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to