mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1218315 - Replace NS_LITERAL_STRING(...).get() with MOZ_UTF16(...) on dom. r=nfroyd
This commit is contained in:
parent
c97296f857
commit
369a8a18e3
@ -131,8 +131,8 @@ public:
|
||||
observerService->NotifyObservers(
|
||||
ToSupports(mWindow),
|
||||
"audio-playback",
|
||||
mActive ? NS_LITERAL_STRING("active").get()
|
||||
: NS_LITERAL_STRING("inactive").get());
|
||||
mActive ? MOZ_UTF16("active")
|
||||
: MOZ_UTF16("inactive"));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
@ -1563,8 +1563,8 @@ WebSocketImpl::Init(JSContext* aCx,
|
||||
}
|
||||
mSecure = true;
|
||||
|
||||
const char16_t* params[] = { reportSpec.get(), NS_LITERAL_STRING("wss").get() };
|
||||
CSP_LogLocalizedStr(NS_LITERAL_STRING("upgradeInsecureRequest").get(),
|
||||
const char16_t* params[] = { reportSpec.get(), MOZ_UTF16("wss") };
|
||||
CSP_LogLocalizedStr(MOZ_UTF16("upgradeInsecureRequest"),
|
||||
params, ArrayLength(params),
|
||||
EmptyString(), // aSourceFile
|
||||
EmptyString(), // aScriptSample
|
||||
|
@ -1303,7 +1303,7 @@ nsGonkCameraControl::StopRecordingImpl()
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
obs->NotifyObservers(mFile, "file-watcher-notify", NS_LITERAL_STRING("modified").get());
|
||||
obs->NotifyObservers(mFile, "file-watcher-notify", MOZ_UTF16("modified"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -1764,7 +1764,7 @@ HTMLFormElement::GetActionURL(nsIURI** aActionURL,
|
||||
NS_ConvertUTF8toUTF16 reportScheme(scheme);
|
||||
|
||||
const char16_t* params[] = { reportSpec.get(), reportScheme.get() };
|
||||
CSP_LogLocalizedStr(NS_LITERAL_STRING("upgradeInsecureRequest").get(),
|
||||
CSP_LogLocalizedStr(MOZ_UTF16("upgradeInsecureRequest"),
|
||||
params, ArrayLength(params),
|
||||
EmptyString(), // aSourceFile
|
||||
EmptyString(), // aScriptSample
|
||||
|
@ -776,7 +776,7 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource,
|
||||
const char16_t* params[] = { reportURIs[r].get() };
|
||||
CSPCONTEXTLOG(("Could not create nsIURI for report URI %s",
|
||||
reportURICstring.get()));
|
||||
CSP_LogLocalizedStr(NS_LITERAL_STRING("triedToSendReport").get(),
|
||||
CSP_LogLocalizedStr(MOZ_UTF16("triedToSendReport"),
|
||||
params, ArrayLength(params),
|
||||
aSourceFile, aScriptSample, aLineNum, 0,
|
||||
nsIScriptError::errorFlag, "CSP", mInnerWindowID);
|
||||
@ -820,7 +820,7 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource,
|
||||
|
||||
if (!isHttpScheme) {
|
||||
const char16_t* params[] = { reportURIs[r].get() };
|
||||
CSP_LogLocalizedStr(NS_LITERAL_STRING("reportURInotHttpsOrHttp2").get(),
|
||||
CSP_LogLocalizedStr(MOZ_UTF16("reportURInotHttpsOrHttp2"),
|
||||
params, ArrayLength(params),
|
||||
aSourceFile, aScriptSample, aLineNum, 0,
|
||||
nsIScriptError::errorFlag, "CSP", mInnerWindowID);
|
||||
@ -904,7 +904,7 @@ nsCSPContext::SendReports(nsISupports* aBlockedContentSource,
|
||||
if (NS_FAILED(rv)) {
|
||||
const char16_t* params[] = { reportURIs[r].get() };
|
||||
CSPCONTEXTLOG(("AsyncOpen failed for report URI %s", params[0]));
|
||||
CSP_LogLocalizedStr(NS_LITERAL_STRING("triedToSendReport").get(),
|
||||
CSP_LogLocalizedStr(MOZ_UTF16("triedToSendReport"),
|
||||
params, ArrayLength(params),
|
||||
aSourceFile, aScriptSample, aLineNum, 0,
|
||||
nsIScriptError::errorFlag, "CSP", mInnerWindowID);
|
||||
@ -994,8 +994,8 @@ class CSPReportSenderRunnable final : public nsRunnable
|
||||
const char16_t* params[] = { mViolatedDirective.get(),
|
||||
blockedDataChar16.get() };
|
||||
|
||||
CSP_LogLocalizedStr(mReportOnlyFlag ? NS_LITERAL_STRING("CSPROViolationWithURI").get() :
|
||||
NS_LITERAL_STRING("CSPViolationWithURI").get(),
|
||||
CSP_LogLocalizedStr(mReportOnlyFlag ? MOZ_UTF16("CSPROViolationWithURI") :
|
||||
MOZ_UTF16("CSPViolationWithURI"),
|
||||
params, ArrayLength(params),
|
||||
mSourceFile, mScriptSample, mLineNum, 0,
|
||||
nsIScriptError::errorFlag, "CSP", mInnerWindowID);
|
||||
@ -1313,7 +1313,7 @@ CSPReportRedirectSink::AsyncOnChannelRedirect(nsIChannel* aOldChannel,
|
||||
NS_ASSERTION(observerService, "Observer service required to log CSP violations");
|
||||
observerService->NotifyObservers(uri,
|
||||
CSP_VIOLATION_TOPIC,
|
||||
NS_LITERAL_STRING("denied redirect while sending violation report").get());
|
||||
MOZ_UTF16("denied redirect while sending violation report"));
|
||||
|
||||
return NS_BINDING_REDIRECTED;
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ nsCSPParser::directive()
|
||||
// Make sure that the directive-srcs-array contains at least
|
||||
// one directive and one src.
|
||||
if (mCurDir.Length() < 1) {
|
||||
const char16_t* params[] = { NS_LITERAL_STRING("directive missing").get() };
|
||||
const char16_t* params[] = { MOZ_UTF16("directive missing") };
|
||||
logWarningErrorToConsole(nsIScriptError::warningFlag, "failedToParseUnrecognizedSource",
|
||||
params, ArrayLength(params));
|
||||
return;
|
||||
@ -1029,7 +1029,7 @@ nsCSPParser::directive()
|
||||
// by a directive name but does not include any srcs.
|
||||
if (cspDir->equals(nsIContentSecurityPolicy::UPGRADE_IF_INSECURE_DIRECTIVE)) {
|
||||
if (mCurDir.Length() > 1) {
|
||||
const char16_t* params[] = { NS_LITERAL_STRING("upgrade-insecure-requests").get() };
|
||||
const char16_t* params[] = { MOZ_UTF16("upgrade-insecure-requests") };
|
||||
logWarningErrorToConsole(nsIScriptError::warningFlag,
|
||||
"ignoreSrcForDirective",
|
||||
params, ArrayLength(params));
|
||||
@ -1062,7 +1062,7 @@ nsCSPParser::directive()
|
||||
mHasHashOrNonce && mUnsafeInlineKeywordSrc) {
|
||||
mUnsafeInlineKeywordSrc->invalidate();
|
||||
// log to the console that unsafe-inline will be ignored
|
||||
const char16_t* params[] = { NS_LITERAL_STRING("'unsafe-inline'").get() };
|
||||
const char16_t* params[] = { MOZ_UTF16("'unsafe-inline'") };
|
||||
logWarningErrorToConsole(nsIScriptError::warningFlag, "ignoringSrcWithinScriptSrc",
|
||||
params, ArrayLength(params));
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ nsXULContentUtils::Init()
|
||||
|
||||
#define XUL_LITERAL(ident, val) \
|
||||
PR_BEGIN_MACRO \
|
||||
rv = gRDF->GetLiteral(NS_LITERAL_STRING(val).get(), &(ident)); \
|
||||
rv = gRDF->GetLiteral(MOZ_UTF16(val), &(ident)); \
|
||||
if (NS_FAILED(rv)) return rv; \
|
||||
PR_END_MACRO
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user