Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Aug 2017 16:46:59 +0000 (16:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Aug 2017 16:46:59 +0000 (16:46 +0000)
commit1b357ea56fdacd7aaa2500ee789c369034625593
tree9befd04859c46d7791b5713f91d6071bd6f0f0ce
parentaaf8cca79e3b8f9444d39cc266cc9601682284b7
Use LazyNeverDestroyed instead of DEFINE_GLOBAL for QualifiedName
https://bugs.webkit.org/show_bug.cgi?id=175010
<rdar://problem/33647818>

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2017-08-02
Reviewed by Alex Christensen.

Source/WebCore:

No new tests because no behavior change.

Stop using DEFINE_GLOBAL hack in favor of LazyNeverDestroyed.

* contentextensions/ContentExtensionParser.cpp:
(WebCore::ContentExtensions::isValidCSSSelector):
Call QualifiedName::init().
* dom/DOMAllInOne.cpp: Remove the warning. Include QualifiedName.cpp.
* dom/QualifiedName.cpp:
(WebCore::QualifiedName::init): Call LazyNeverDestroyed::construct
instead of placement new.
* dom/QualifiedName.h: Use LazyNeverDestroyed.

Source/WebKit:

* UIProcess/API/APIContentRuleListStore.cpp:
(API::ContentRuleListStore::compileContentRuleList):
Call QualifiedName::init().

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/contentextensions/ContentExtensionParser.cpp
Source/WebCore/dom/DOMAllInOne.cpp
Source/WebCore/dom/QualifiedName.cpp
Source/WebCore/dom/QualifiedName.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp