mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
Bug 1377999 - Make CDATASection to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62354 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
908efe692e
commit
1d4b093969
@ -7798,7 +7798,8 @@ already_AddRefed<CDATASection> Document::CreateCDATASection(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RefPtr<CDATASection> cdata = new CDATASection(mNodeInfoManager);
|
||||
RefPtr<CDATASection> cdata =
|
||||
new (mNodeInfoManager) CDATASection(mNodeInfoManager);
|
||||
|
||||
// Don't notify; this node is still being created.
|
||||
cdata->SetText(aData, false);
|
||||
|
@ -23,7 +23,8 @@ bool CDATASection::IsNodeOfType(uint32_t aFlags) const { return false; }
|
||||
already_AddRefed<CharacterData> CDATASection::CloneDataNode(
|
||||
mozilla::dom::NodeInfo* aNodeInfo, bool aCloneText) const {
|
||||
RefPtr<mozilla::dom::NodeInfo> ni = aNodeInfo;
|
||||
RefPtr<CDATASection> it = new CDATASection(ni.forget());
|
||||
auto* nim = ni->NodeInfoManager();
|
||||
RefPtr<CDATASection> it = new (nim) CDATASection(ni.forget());
|
||||
if (aCloneText) {
|
||||
it->mText = mText;
|
||||
}
|
||||
|
@ -1103,7 +1103,8 @@ nsXMLContentSink::HandleCDataSection(const char16_t* aData, uint32_t aLength) {
|
||||
|
||||
FlushText();
|
||||
|
||||
RefPtr<CDATASection> cdata = new CDATASection(mNodeInfoManager);
|
||||
RefPtr<CDATASection> cdata =
|
||||
new (mNodeInfoManager) CDATASection(mNodeInfoManager);
|
||||
cdata->SetText(aData, aLength, false);
|
||||
nsresult rv = AddContentAsLeaf(cdata);
|
||||
DidAddContent();
|
||||
|
Loading…
Reference in New Issue
Block a user