mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1260399 - Remove deprecated messages in nsICookieManager methods - part 4 - remove the deprecated message, r=ehsan
This commit is contained in:
parent
b958c6f170
commit
47e5a8b711
@ -2582,45 +2582,6 @@ nsCookieService::GetSessionEnumerator(nsISimpleEnumerator **aEnumerator)
|
||||
return NS_NewArrayEnumerator(aEnumerator, cookieList, NS_GET_IID(nsICookie2));
|
||||
}
|
||||
|
||||
static nsresult
|
||||
InitializeOriginAttributes(OriginAttributes* aAttrs,
|
||||
JS::HandleValue aOriginAttributes,
|
||||
JSContext* aCx,
|
||||
uint8_t aArgc,
|
||||
const char16_t* aAPI,
|
||||
const char16_t* aInterfaceSuffix)
|
||||
{
|
||||
MOZ_ASSERT(aAttrs);
|
||||
MOZ_ASSERT(aCx);
|
||||
MOZ_ASSERT(aAPI);
|
||||
MOZ_ASSERT(aInterfaceSuffix);
|
||||
|
||||
if (aArgc == 0) {
|
||||
const char16_t* params[] = {
|
||||
aAPI,
|
||||
aInterfaceSuffix
|
||||
};
|
||||
|
||||
// This is supposed to be temporary and in 1 or 2 releases we want to
|
||||
// have originAttributes param as mandatory. But for now, we don't want to
|
||||
// break existing addons, so we write a console message to inform the addon
|
||||
// developers about it.
|
||||
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
|
||||
NS_LITERAL_CSTRING("Cookie Manager"),
|
||||
nullptr,
|
||||
nsContentUtils::eNECKO_PROPERTIES,
|
||||
"nsICookieManagerAPIDeprecated",
|
||||
params, ArrayLength(params));
|
||||
} else if (aArgc == 1) {
|
||||
if (!aOriginAttributes.isObject() ||
|
||||
!aAttrs->Init(aCx, aOriginAttributes)) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCookieService::Add(const nsACString &aHost,
|
||||
const nsACString &aPath,
|
||||
|
@ -56,7 +56,3 @@ CookieAllowedForTrackerByStorageAccessAPI=Storage access granted for tracker “
|
||||
CookieAllowedForOriginOnTrackerByHeuristic=Storage access automatically granted for “%3$S” opened by tracker “%2$S” on “%1$S”.
|
||||
# LOCALIZATION NOTE (CookieAllowedForTrackerByHeuristic): %2$S and %1$S are URLs.
|
||||
CookieAllowedForTrackerByHeuristic=Storage access automatically granted for tracker “%2$S” on “%1$S”.
|
||||
|
||||
# LOCALIZATION NOTE (nsICookieManagerAPIDeprecated): don't localize originAttributes.
|
||||
# %1$S is the deprecated API; %2$S is the interface suffix that the given deprecated API belongs to.
|
||||
nsICookieManagerAPIDeprecated=“%1$S” is changed. Update your code and pass the correct originAttributes. Read more on MDN: https://developer.mozilla.org/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsICookieManager%2$S
|
||||
|
Loading…
x
Reference in New Issue
Block a user