mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-26 23:23:33 +00:00
Bug 1277222 - don't needlessly copy a string in XULDocument::MaybeBroadcast; r=smaug
The listener's SetAttr method takes a |const nsAString&|, so copying the string in any form before passing it is just needless work.
This commit is contained in:
parent
14bcc45698
commit
760e7a2a76
@ -3148,7 +3148,7 @@ XULDocument::MaybeBroadcast()
|
||||
if (mDelayedAttrChangeBroadcasts[i].mNeedsAttrChange) {
|
||||
nsCOMPtr<nsIContent> listener =
|
||||
do_QueryInterface(mDelayedAttrChangeBroadcasts[i].mListener);
|
||||
nsString value = mDelayedAttrChangeBroadcasts[i].mAttr;
|
||||
const nsString& value = mDelayedAttrChangeBroadcasts[i].mAttr;
|
||||
if (mDelayedAttrChangeBroadcasts[i].mSetAttr) {
|
||||
listener->SetAttr(kNameSpaceID_None, attrName, value,
|
||||
true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user