Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi

Differential Revision: https://phabricator.services.mozilla.com/D82325
This commit is contained in:
Simon Giesecke
2020-09-23 15:17:15 +00:00
parent 657e465a83
commit ab6f0a7137
447 changed files with 1257 additions and 1389 deletions

View File

@@ -279,8 +279,7 @@ void nsGenericHTMLFrameElement::AfterMaybeChangeAttr(
if (aNamespaceID == kNameSpaceID_None) {
if (aName == nsGkAtoms::src) {
mSrcTriggeringPrincipal = nsContentUtils::GetAttrTriggeringPrincipal(
this, aValue ? aValue->String() : EmptyString(),
aMaybeScriptedPrincipal);
this, aValue ? aValue->String() : u""_ns, aMaybeScriptedPrincipal);
if (!IsHTMLElement(nsGkAtoms::iframe) ||
!HasAttr(kNameSpaceID_None, nsGkAtoms::srcdoc)) {
// Don't propagate error here. The attribute was successfully
@@ -292,11 +291,7 @@ void nsGenericHTMLFrameElement::AfterMaybeChangeAttr(
RefPtr<BrowsingContext> bc =
mFrameLoader ? mFrameLoader->GetExtantBrowsingContext() : nullptr;
if (bc) {
if (aValue) {
MOZ_ALWAYS_SUCCEEDS(bc->SetName(aValue->String()));
} else {
MOZ_ALWAYS_SUCCEEDS(bc->SetName(EmptyString()));
}
MOZ_ALWAYS_SUCCEEDS(bc->SetName(aValue ? aValue->String() : u""_ns));
}
}
}