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:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user