Backed out changeset 77af189b5c49 (bug 1373984) for build bustage in nsHtml5Parser.cpp a=backout CLOSED TREE

MozReview-Commit-ID: 6kBmU71j2To
This commit is contained in:
Wes Kocher
2017-06-25 05:10:14 -07:00
parent de5721ea81
commit d214d1f5fa
81 changed files with 446 additions and 579 deletions

View File

@@ -105,6 +105,7 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation()
break;
case eTreeOpSetDocumentCharset:
case eTreeOpNeedsCharsetSwitchTo:
delete[] mOne.charPtr;
break;
case eTreeOpProcessOfflineManifest:
free(mOne.unicharPtr);
@@ -788,16 +789,17 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
return NS_OK;
}
case eTreeOpSetDocumentCharset: {
auto encoding = WrapNotNull(mOne.encoding);
char* str = mOne.charPtr;
int32_t charsetSource = mFour.integer;
aBuilder->SetDocumentCharsetAndSource(encoding, charsetSource);
nsDependentCString dependentString(str);
aBuilder->SetDocumentCharsetAndSource(dependentString, charsetSource);
return NS_OK;
}
case eTreeOpNeedsCharsetSwitchTo: {
auto encoding = WrapNotNull(mOne.encoding);
char* str = mOne.charPtr;
int32_t charsetSource = mFour.integer;
int32_t lineNumber = mTwo.integer;
aBuilder->NeedsCharsetSwitchTo(encoding, charsetSource, (uint32_t)lineNumber);
aBuilder->NeedsCharsetSwitchTo(str, charsetSource, (uint32_t)lineNumber);
return NS_OK;
}
case eTreeOpUpdateStyleSheet: {
@@ -882,11 +884,11 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
nsIDocument* doc = aBuilder->GetDocument();
auto encoding = doc->GetDocumentCharacterSet();
const nsCString& charset = doc->GetDocumentCharacterSet();
nsCOMPtr<nsIURI> uri;
nsresult rv = NS_NewURI(getter_AddRefs(uri),
relative,
encoding,
charset.get(),
aBuilder->GetViewSourceBaseURI());
NS_ENSURE_SUCCESS(rv, NS_OK);