Skip to content

Commit

Permalink
Backed out 12 changesets (bug 1344629) for stylo build bustage
Browse files Browse the repository at this point in the history
Backed out changeset cf4273d3ac30 (bug 1344629)
Backed out changeset a96390e044e0 (bug 1344629)
Backed out changeset d9b330f9bc24 (bug 1344629)
Backed out changeset 2b460fe020af (bug 1344629)
Backed out changeset 0ada91b0452e (bug 1344629)
Backed out changeset 083304fcd6bd (bug 1344629)
Backed out changeset 53d7d1ce2c97 (bug 1344629)
Backed out changeset 55eee7078ae4 (bug 1344629)
Backed out changeset 7d3c06b3eca9 (bug 1344629)
Backed out changeset e5df14c3db61 (bug 1344629)
Backed out changeset 636095ff2815 (bug 1344629)
Backed out changeset 0be052ad24c1 (bug 1344629)
  • Loading branch information
IrisHsiao committed Mar 14, 2017
1 parent 5311243 commit 325d5db
Show file tree
Hide file tree
Showing 50 changed files with 494 additions and 483 deletions.
6 changes: 3 additions & 3 deletions browser/components/shell/nsWindowsShellService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ nsWindowsShellService::ShortcutMaintenance()
if (NS_FAILED(taskbarInfo->GetDefaultGroupId(appId)))
return NS_ERROR_UNEXPECTED;

const char* prefName = "browser.taskbar.lastgroupid";
NS_NAMED_LITERAL_CSTRING(prefName, "browser.taskbar.lastgroupid");
nsCOMPtr<nsIPrefBranch> prefs =
do_GetService(NS_PREFSERVICE_CONTRACTID);
if (!prefs)
return NS_ERROR_UNEXPECTED;

nsCOMPtr<nsISupportsString> prefString;
rv = prefs->GetComplexValue(prefName,
rv = prefs->GetComplexValue(prefName.get(),
NS_GET_IID(nsISupportsString),
getter_AddRefs(prefString));
if (NS_SUCCEEDED(rv)) {
Expand All @@ -191,7 +191,7 @@ nsWindowsShellService::ShortcutMaintenance()
return rv;

prefString->SetData(appId);
rv = prefs->SetComplexValue(prefName,
rv = prefs->SetComplexValue(prefName.get(),
NS_GET_IID(nsISupportsString),
prefString);
if (NS_FAILED(rv)) {
Expand Down
18 changes: 10 additions & 8 deletions dom/base/nsJSEnvironment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1632,11 +1632,11 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
gcMsg.AssignLiteral(", forced a GC");
}

const char16_t *kFmt =
NS_NAMED_LITERAL_STRING(kFmt,
u"CC(T+%.1f)[%s-%i] max pause: %lums, total time: %lums, slices: %lu, suspected: %lu, visited: %lu RCed and %lu%s GCed, collected: %lu RCed and %lu GCed (%lu|%lu|%lu waiting for GC)%s\n"
u"ForgetSkippable %lu times before CC, min: %lu ms, max: %lu ms, avg: %lu ms, total: %lu ms, max sync: %lu ms, removed: %lu";
u"ForgetSkippable %lu times before CC, min: %lu ms, max: %lu ms, avg: %lu ms, total: %lu ms, max sync: %lu ms, removed: %lu");
nsString msg;
msg.Adopt(nsTextFormatter::smprintf(kFmt, double(delta) / PR_USEC_PER_SEC,
msg.Adopt(nsTextFormatter::smprintf(kFmt.get(), double(delta) / PR_USEC_PER_SEC,
ProcessNameForCollectorLog(), getpid(),
gCCStats.mMaxSliceTime, gCCStats.mTotalSliceTime,
aResults.mNumSlices, gCCStats.mSuspected,
Expand Down Expand Up @@ -1664,7 +1664,7 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
}

if (sPostGCEventsToObserver) {
const char16_t* kJSONFmt =
NS_NAMED_LITERAL_STRING(kJSONFmt,
u"{ \"timestamp\": %llu, "
u"\"duration\": %lu, "
u"\"max_slice_pause\": %lu, "
Expand All @@ -1689,10 +1689,10 @@ nsJSContext::EndCycleCollectionCallback(CycleCollectorResults &aResults)
u"\"avg\": %lu, "
u"\"total\": %lu, "
u"\"removed\": %lu } "
u"}";
u"}");
nsString json;

json.Adopt(nsTextFormatter::smprintf(kJSONFmt, PR_Now(), ccNowDuration,
json.Adopt(nsTextFormatter::smprintf(kJSONFmt.get(), PR_Now(), ccNowDuration,
gCCStats.mMaxSliceTime,
gCCStats.mTotalSliceTime,
gCCStats.mMaxGCDuration,
Expand Down Expand Up @@ -2139,9 +2139,10 @@ DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress, const JS::GCDescrip
PRTime delta = GetCollectionTimeDelta();

if (sPostGCEventsToConsole) {
NS_NAMED_LITERAL_STRING(kFmt, "GC(T+%.1f)[%s-%i] ");
nsString prefix, gcstats;
gcstats.Adopt(aDesc.formatSummaryMessage(aCx));
prefix.Adopt(nsTextFormatter::smprintf(u"GC(T+%.1f)[%s-%i] ",
prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
double(delta) / PR_USEC_PER_SEC,
ProcessNameForCollectorLog(),
getpid()));
Expand Down Expand Up @@ -2222,9 +2223,10 @@ DOMGCSliceCallback(JSContext* aCx, JS::GCProgress aProgress, const JS::GCDescrip
}

if (sPostGCEventsToConsole) {
NS_NAMED_LITERAL_STRING(kFmt, "[%s-%i] ");
nsString prefix, gcstats;
gcstats.Adopt(aDesc.formatSliceMessage(aCx));
prefix.Adopt(nsTextFormatter::smprintf(u"[%s-%i] ",
prefix.Adopt(nsTextFormatter::smprintf(kFmt.get(),
ProcessNameForCollectorLog(),
getpid()));
nsString msg = prefix + gcstats;
Expand Down
3 changes: 2 additions & 1 deletion dom/html/ImageDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ ImageDocument::OnLoadComplete(imgIRequest* aRequest, nsresult aStatus)
NS_ConvertUTF8toUTF16 srcString(src);
const char16_t* formatString[] = { srcString.get() };
nsXPIDLString errorMsg;
mStringBundle->FormatStringFromName(u"InvalidImage", formatString, 1,
NS_NAMED_LITERAL_STRING(str, "InvalidImage");
mStringBundle->FormatStringFromName(str.get(), formatString, 1,
getter_Copies(errorMsg));

mImageContent->SetAttr(kNameSpaceID_None, nsGkAtoms::alt, errorMsg, false);
Expand Down
3 changes: 2 additions & 1 deletion dom/html/MediaDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ MediaDocument::UpdateTitleAndCharset(const nsACString& aTypeStr,
nsXPIDLString titleWithStatus;
const nsPromiseFlatString& status = PromiseFlatString(aStatus);
const char16_t *formatStrings[2] = {title.get(), status.get()};
mStringBundle->FormatStringFromName(u"TitleWithStatus", formatStrings, 2,
NS_NAMED_LITERAL_STRING(fmtName, "TitleWithStatus");
mStringBundle->FormatStringFromName(fmtName.get(), formatStrings, 2,
getter_Copies(titleWithStatus));
SetTitle(titleWithStatus);
}
Expand Down
2 changes: 1 addition & 1 deletion dom/jsurl/nsJSProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel,
uint32_t bytesLen;
NS_NAMED_LITERAL_CSTRING(isoCharset, "ISO-8859-1");
NS_NAMED_LITERAL_CSTRING(utf8Charset, "UTF-8");
const nsLiteralCString *charset;
const nsCString *charset;
if (IsISO88591(result)) {
// For compatibility, if the result is ISO-8859-1, we use
// ISO-8859-1, so that people can compatibly create images
Expand Down
12 changes: 6 additions & 6 deletions dom/power/PowerManagerService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ PowerManagerService::SyncProfile()
{
nsCOMPtr<nsIObserverService> obsServ = services::GetObserverService();
if (obsServ) {
const char16_t* context = u"shutdown-persist";
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context);
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context);
obsServ->NotifyObservers(nullptr, "profile-before-change", context);
obsServ->NotifyObservers(nullptr, "profile-before-change-qm", context);
obsServ->NotifyObservers(nullptr, "profile-before-change-telemetry", context);
NS_NAMED_LITERAL_STRING(context, "shutdown-persist");
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
obsServ->NotifyObservers(nullptr, "profile-before-change-qm", context.get());
obsServ->NotifyObservers(nullptr, "profile-before-change-telemetry", context.get());
}
}

Expand Down
2 changes: 1 addition & 1 deletion dom/security/nsCSPParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ nsCSPParser::directiveName()

// if we have a frame-src, cache it so we can decide whether to use child-src
if (CSP_IsDirective(mCurToken, nsIContentSecurityPolicy::FRAME_SRC_DIRECTIVE)) {
const char16_t* params[] = { mCurToken.get(), u"child-src" };
const char16_t* params[] = { mCurToken.get(), NS_LITERAL_STRING("child-src").get() };
logWarningErrorToConsole(nsIScriptError::warningFlag, "deprecatedDirective",
params, ArrayLength(params));
mFrameSrc = new nsCSPDirective(CSP_StringToCSPDirective(mCurToken));
Expand Down
7 changes: 4 additions & 3 deletions dom/xhr/XMLHttpRequestMainThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2588,10 +2588,11 @@ XMLHttpRequestMainThread::InitiateFetch(nsIInputStream* aUploadStream,
nsCOMPtr<nsIConsoleService> consoleService =
do_GetService(NS_CONSOLESERVICE_CONTRACTID);
if (consoleService) {
consoleService->LogStringMessage(
u"Http channel implementation doesn't support nsIUploadChannel2. "
consoleService->LogStringMessage(NS_LITERAL_STRING(
"Http channel implementation doesn't support nsIUploadChannel2. "
"An extension has supplied a non-functional http protocol handler. "
"This will break behavior and in future releases not work at all.");
"This will break behavior and in future releases not work at all."
).get());
}
}

Expand Down
3 changes: 1 addition & 2 deletions editor/libeditor/HTMLEditRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3464,8 +3464,7 @@ HTMLEditRules::WillMakeDefListItem(Selection* aSelection,
{
// for now we let WillMakeList handle this
NS_NAMED_LITERAL_STRING(listType, "dl");
return WillMakeList(aSelection, &listType.AsString(), aEntireList, nullptr,
aCancel, aHandled, aItemType);
return WillMakeList(aSelection, &listType, aEntireList, nullptr, aCancel, aHandled, aItemType);
}

nsresult
Expand Down
8 changes: 4 additions & 4 deletions editor/libeditor/HTMLStyleEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1633,8 +1633,8 @@ HTMLEditor::GetFontFaceState(bool* aMixed,

NS_NAMED_LITERAL_STRING(attr, "face");
nsresult rv =
GetInlinePropertyBase(*nsGkAtoms::font, &attr.AsString(), nullptr, &first,
&any, &all, &outFace);
GetInlinePropertyBase(*nsGkAtoms::font, &attr, nullptr, &first, &any,
&all, &outFace);
NS_ENSURE_SUCCESS(rv, rv);
if (any && !all) {
return NS_OK; // mixed
Expand Down Expand Up @@ -1676,8 +1676,8 @@ HTMLEditor::GetFontColorState(bool* aMixed,
bool first, any, all;

nsresult rv =
GetInlinePropertyBase(*nsGkAtoms::font, &colorStr.AsString(), nullptr,
&first, &any, &all, &aOutColor);
GetInlinePropertyBase(*nsGkAtoms::font, &colorStr, nullptr, &first,
&any, &all, &aOutColor);
NS_ENSURE_SUCCESS(rv, rv);
if (any && !all) {
return NS_OK; // mixed
Expand Down
5 changes: 2 additions & 3 deletions editor/libeditor/TextEditRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,8 @@ TextEditRules::WillInsertBreak(Selection* aSelection,
NS_NAMED_LITERAL_STRING(inString, "\n");
nsAutoString outString;
bool didTruncate;
nsresult rv = TruncateInsertionIfNeeded(aSelection, &inString.AsString(),
&outString, aMaxLength,
&didTruncate);
nsresult rv = TruncateInsertionIfNeeded(aSelection, &inString, &outString,
aMaxLength, &didTruncate);
NS_ENSURE_SUCCESS(rv, rv);
if (didTruncate) {
*aCancel = true;
Expand Down
12 changes: 6 additions & 6 deletions layout/generic/nsPageFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr)
// then subst in the current date/time
NS_NAMED_LITERAL_STRING(kDate, "&D");
if (aStr.Find(kDate) != kNotFound) {
aNewStr.ReplaceSubstring(kDate, mPD->mDateTimeStr);
aNewStr.ReplaceSubstring(kDate.get(), mPD->mDateTimeStr.get());
}

// NOTE: Must search for &PT before searching for &P
Expand All @@ -204,7 +204,7 @@ nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr)
NS_NAMED_LITERAL_STRING(kPageAndTotal, "&PT");
if (aStr.Find(kPageAndTotal) != kNotFound) {
char16_t * uStr = nsTextFormatter::smprintf(mPD->mPageNumAndTotalsFormat.get(), mPageNum, mTotNumPages);
aNewStr.ReplaceSubstring(kPageAndTotal, nsDependentString(uStr));
aNewStr.ReplaceSubstring(kPageAndTotal.get(), uStr);
free(uStr);
}

Expand All @@ -213,24 +213,24 @@ nsPageFrame::ProcessSpecialCodes(const nsString& aStr, nsString& aNewStr)
NS_NAMED_LITERAL_STRING(kPage, "&P");
if (aStr.Find(kPage) != kNotFound) {
char16_t * uStr = nsTextFormatter::smprintf(mPD->mPageNumFormat.get(), mPageNum);
aNewStr.ReplaceSubstring(kPage, nsDependentString(uStr));
aNewStr.ReplaceSubstring(kPage.get(), uStr);
free(uStr);
}

NS_NAMED_LITERAL_STRING(kTitle, "&T");
if (aStr.Find(kTitle) != kNotFound) {
aNewStr.ReplaceSubstring(kTitle, mPD->mDocTitle);
aNewStr.ReplaceSubstring(kTitle.get(), mPD->mDocTitle.get());
}

NS_NAMED_LITERAL_STRING(kDocURL, "&U");
if (aStr.Find(kDocURL) != kNotFound) {
aNewStr.ReplaceSubstring(kDocURL, mPD->mDocURL);
aNewStr.ReplaceSubstring(kDocURL.get(), mPD->mDocURL.get());
}

NS_NAMED_LITERAL_STRING(kPageTotal, "&L");
if (aStr.Find(kPageTotal) != kNotFound) {
char16_t * uStr = nsTextFormatter::smprintf(mPD->mPageNumFormat.get(), mTotNumPages);
aNewStr.ReplaceSubstring(kPageTotal, nsDependentString(uStr));
aNewStr.ReplaceSubstring(kPageTotal.get(), uStr);
free(uStr);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ class PeerConnectionCtxObserver : public nsIObserver
PeerConnectionCtx::gPeerConnectionCtxObserver = nullptr;
}
if (strcmp(aTopic, NS_IOSERVICE_OFFLINE_STATUS_TOPIC) == 0) {
if (NS_strcmp(aData, u"" NS_IOSERVICE_OFFLINE) == 0) {
const nsLiteralString onlineString(u"" NS_IOSERVICE_ONLINE);
const nsLiteralString offlineString(u"" NS_IOSERVICE_OFFLINE);
if (NS_strcmp(aData, offlineString.get()) == 0) {
CSFLogDebug(logTag, "Updating network state to offline");
PeerConnectionCtx::UpdateNetworkState(false);
} else if(NS_strcmp(aData, u"" NS_IOSERVICE_ONLINE) == 0) {
} else if(NS_strcmp(aData, onlineString.get()) == 0) {
CSFLogDebug(logTag, "Updating network state to online");
PeerConnectionCtx::UpdateNetworkState(true);
} else {
Expand Down
17 changes: 9 additions & 8 deletions netwerk/base/nsIOService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,10 +834,9 @@ nsIOService::NewChannelFromURIWithProxyFlagsInternal(nsIURI* aURI,
nsCOMPtr<nsIConsoleService> consoleService =
do_GetService(NS_CONSOLESERVICE_CONTRACTID);
if (consoleService) {
consoleService->LogStringMessage(u"Http channel implementation "
"doesn't support nsIUploadChannel2. An extension has "
"supplied a non-functional http protocol handler. This will "
"break behavior and in future releases not work at all.");
consoleService->LogStringMessage(NS_LITERAL_STRING(
"Http channel implementation doesn't support nsIUploadChannel2. An extension has supplied a non-functional http protocol handler. This will break behavior and in future releases not work at all."
).get());
}
gHasWarnedUploadChannel2 = true;
}
Expand Down Expand Up @@ -1063,13 +1062,14 @@ nsIOService::SetOffline(bool offline)
offline = mSetOfflineValue;

if (offline && !mOffline) {
NS_NAMED_LITERAL_STRING(offlineString, NS_IOSERVICE_OFFLINE);
mOffline = true; // indicate we're trying to shutdown

// don't care if notifications fail
if (observerService)
observerService->NotifyObservers(subject,
NS_IOSERVICE_GOING_OFFLINE_TOPIC,
u"" NS_IOSERVICE_OFFLINE);
offlineString.get());

if (mSocketTransportService)
mSocketTransportService->SetOffline(true);
Expand All @@ -1078,7 +1078,7 @@ nsIOService::SetOffline(bool offline)
if (observerService)
observerService->NotifyObservers(subject,
NS_IOSERVICE_OFFLINE_STATUS_TOPIC,
u"" NS_IOSERVICE_OFFLINE);
offlineString.get());
}
else if (!offline && mOffline) {
// go online
Expand Down Expand Up @@ -1193,12 +1193,13 @@ nsIOService::SetConnectivityInternal(bool aConnectivity)
} else {
// If we were previously online and lost connectivity
// send the OFFLINE notification
const nsLiteralString offlineString(u"" NS_IOSERVICE_OFFLINE);
observerService->NotifyObservers(static_cast<nsIIOService *>(this),
NS_IOSERVICE_GOING_OFFLINE_TOPIC,
u"" NS_IOSERVICE_OFFLINE);
offlineString.get());
observerService->NotifyObservers(static_cast<nsIIOService *>(this),
NS_IOSERVICE_OFFLINE_STATUS_TOPIC,
u"" NS_IOSERVICE_OFFLINE);
offlineString.get());
}
return NS_OK;
}
Expand Down
3 changes: 2 additions & 1 deletion netwerk/protocol/ftp/nsFtpConnectionThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -946,9 +946,10 @@ nsFtpState::R_syst() {

char16_t* ucs2Response = ToNewUnicode(mResponseMsg);
const char16_t *formatStrings[1] = { ucs2Response };
NS_NAMED_LITERAL_STRING(name, "UnsupportedFTPServer");

nsXPIDLString formattedString;
rv = bundle->FormatStringFromName(u"UnsupportedFTPServer", formatStrings, 1,
rv = bundle->FormatStringFromName(name.get(), formatStrings, 1,
getter_Copies(formattedString));
free(ucs2Response);
if (NS_FAILED(rv))
Expand Down
2 changes: 1 addition & 1 deletion netwerk/protocol/http/nsHttpHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ nsHttpHandler::AddConnectionHeader(nsHttpRequestHead *request,
NS_NAMED_LITERAL_CSTRING(close, "close");
NS_NAMED_LITERAL_CSTRING(keepAlive, "keep-alive");

const nsLiteralCString *connectionType = &close;
const nsACString *connectionType = &close;
if (caps & NS_HTTP_ALLOW_KEEPALIVE) {
connectionType = &keepAlive;
}
Expand Down
8 changes: 5 additions & 3 deletions security/manager/ssl/nsNSSComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1848,10 +1848,12 @@ nsNSSComponent::Init()
// - wrong thread: 'NS_IsMainThread()' in nsIOService.cpp
// when loading error strings on the SSL threads.
{
const char16_t* dummy = u"dummy";
NS_NAMED_LITERAL_STRING(dummy_name, "dummy");
nsXPIDLString result;
mPIPNSSBundle->GetStringFromName(dummy, getter_Copies(result));
mNSSErrorsBundle->GetStringFromName(dummy, getter_Copies(result));
mPIPNSSBundle->GetStringFromName(dummy_name.get(),
getter_Copies(result));
mNSSErrorsBundle->GetStringFromName(dummy_name.get(),
getter_Copies(result));
}


Expand Down
4 changes: 2 additions & 2 deletions security/manager/ssl/nsNSSU2FToken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const nsCString nsNSSU2FToken::mSecretNickname =
NS_LITERAL_CSTRING("U2F_NSSTOKEN");
const nsString nsNSSU2FToken::mVersion =
NS_LITERAL_STRING("U2F_V2");
const char* kAttestCertSubjectName = "CN=Firefox U2F Soft Token";
NS_NAMED_LITERAL_CSTRING(kAttestCertSubjectName, "CN=Firefox U2F Soft Token");

// This U2F-compatible soft token uses FIDO U2F-compatible ECDSA keypairs
// on the SEC_OID_SECG_EC_SECP256R1 curve. When asked to Register, it will
Expand Down Expand Up @@ -256,7 +256,7 @@ GetAttestationCertificate(const UniquePK11SlotInfo& aSlot,
}

// Construct the Attestation Certificate itself
UniqueCERTName subjectName(CERT_AsciiToName(kAttestCertSubjectName));
UniqueCERTName subjectName(CERT_AsciiToName(kAttestCertSubjectName.get()));
if (!subjectName) {
MOZ_LOG(gNSSTokenLog, LogLevel::Warning,
("Failed to set subject name, NSS error #%d", PORT_GetError()));
Expand Down
Loading

0 comments on commit 325d5db

Please sign in to comment.