Bug 792180 - Replace NS_{UN,}LIKELY with MOZ_{UN,}LIKELY; r=ehsan

This commit is contained in:
Jacek Szpot
2012-10-26 15:32:10 +02:00
parent a710077c4c
commit 09f9b9a1c3
102 changed files with 534 additions and 452 deletions

View File

@@ -35,6 +35,7 @@
#include "nsIProtocolHandler.h"
#include "nsNetUtil.h"
#include "nsIHTMLDocument.h"
#include "mozilla/Likely.h"
namespace dom = mozilla::dom;
@@ -50,7 +51,7 @@ class NS_STACK_CLASS nsHtml5OtherDocUpdate {
{
NS_PRECONDITION(aCurrentDoc, "Node has no doc?");
NS_PRECONDITION(aExecutorDoc, "Executor has no doc?");
if (NS_LIKELY(aCurrentDoc == aExecutorDoc)) {
if (MOZ_LIKELY(aCurrentDoc == aExecutorDoc)) {
mDocument = nullptr;
} else {
mDocument = aCurrentDoc;
@@ -60,7 +61,7 @@ class NS_STACK_CLASS nsHtml5OtherDocUpdate {
~nsHtml5OtherDocUpdate()
{
if (NS_UNLIKELY(mDocument)) {
if (MOZ_UNLIKELY(mDocument)) {
mDocument->EndUpdate(UPDATE_CONTENT_MODEL);
}
}
@@ -179,7 +180,7 @@ nsHtml5TreeOperation::Append(nsIContent* aNode,
nsIDocument* parentDoc = aParent->OwnerDoc();
NS_ASSERTION(parentDoc, "Null owner doc on old node.");
if (NS_LIKELY(executorDoc == parentDoc)) {
if (MOZ_LIKELY(executorDoc == parentDoc)) {
// the usual case. the parent is in the parser's doc
rv = aParent->AppendChildTo(aNode, false);
if (NS_SUCCEEDED(rv)) {
@@ -330,7 +331,7 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
nsHtml5HtmlAttributes* attributes = mThree.attributes;
bool isKeygen = (name == nsHtml5Atoms::keygen && ns == kNameSpaceID_XHTML);
if (NS_UNLIKELY(isKeygen)) {
if (MOZ_UNLIKELY(isKeygen)) {
name = nsHtml5Atoms::select;
}
@@ -349,13 +350,13 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
aBuilder->HoldElement(*target = newContent);
if (NS_UNLIKELY(name == nsHtml5Atoms::style || name == nsHtml5Atoms::link)) {
if (MOZ_UNLIKELY(name == nsHtml5Atoms::style || name == nsHtml5Atoms::link)) {
nsCOMPtr<nsIStyleSheetLinkingElement> ssle(do_QueryInterface(newContent));
if (ssle) {
ssle->InitStyleLinkElement(false);
ssle->SetEnableUpdates(false);
}
} else if (NS_UNLIKELY(isKeygen)) {
} else if (MOZ_UNLIKELY(isKeygen)) {
// Adapted from CNavDTD
nsCOMPtr<nsIFormProcessor> theFormProcessor =
do_GetService(kFormProcessorCID, &rv);