mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1334564 - Deprecate URL.createObjectURL(mediastream), r=smaug, r=rjesup
This commit is contained in:
parent
3f7720742d
commit
16bc4a8d06
@ -50,3 +50,4 @@ DEPRECATED_OPERATION(PrefixedFullscreenAPI)
|
||||
DEPRECATED_OPERATION(LenientSetter)
|
||||
DEPRECATED_OPERATION(FileLastModifiedDate)
|
||||
DEPRECATED_OPERATION(ImageBitmapRenderingContext_TransferImageBitmap)
|
||||
DEPRECATED_OPERATION(URLCreateObjectURL_MediaStream)
|
||||
|
@ -3618,8 +3618,15 @@ DeprecationWarning(JSContext* aCx, JSObject* aObject,
|
||||
return;
|
||||
}
|
||||
|
||||
DeprecationWarning(global, aOperation);
|
||||
}
|
||||
|
||||
void
|
||||
DeprecationWarning(const GlobalObject& aGlobal,
|
||||
nsIDocument::DeprecatedOperations aOperation)
|
||||
{
|
||||
if (NS_IsMainThread()) {
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(global.GetAsSupports());
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal.GetAsSupports());
|
||||
if (window && window->GetExtantDoc()) {
|
||||
window->GetExtantDoc()->WarnOnceAbout(aOperation);
|
||||
}
|
||||
@ -3627,7 +3634,7 @@ DeprecationWarning(JSContext* aCx, JSObject* aObject,
|
||||
return;
|
||||
}
|
||||
|
||||
WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
|
||||
WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aGlobal.Context());
|
||||
if (!workerPrivate) {
|
||||
return;
|
||||
}
|
||||
|
@ -3195,6 +3195,10 @@ void
|
||||
DeprecationWarning(JSContext* aCx, JSObject* aObject,
|
||||
nsIDocument::DeprecatedOperations aOperation);
|
||||
|
||||
void
|
||||
DeprecationWarning(const GlobalObject& aGlobal,
|
||||
nsIDocument::DeprecatedOperations aOperation);
|
||||
|
||||
// A callback to perform funToString on an interface object
|
||||
JSString*
|
||||
InterfaceObjectToString(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
||||
|
@ -321,3 +321,5 @@ LargeAllocationNonE10S=A Large-Allocation header was ignored due to the document
|
||||
GeolocationInsecureRequestIsForbidden=A Geolocation request can only be fulfilled in a secure context.
|
||||
# LOCALIZATION NOTE: Do not translate "Large-Allocation", as it is a literal header name.
|
||||
LargeAllocationNonWin32=This page would be loaded in a new process due to a Large-Allocation header, however Large-Allocation process creation is disabled on non-Win32 platforms.
|
||||
# LOCALIZATION NOTE: Do not translate URL.createObjectURL(MediaStream).
|
||||
URLCreateObjectURL_MediaStream=URL.createObjectURL(MediaStream) is deprecated and will be removed soon.
|
||||
|
@ -1727,6 +1727,9 @@ URL::CreateObjectURL(const GlobalObject& aGlobal, DOMMediaStream& aStream,
|
||||
nsAString& aResult, ErrorResult& aRv)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
DeprecationWarning(aGlobal, nsIDocument::eURLCreateObjectURL_MediaStream);
|
||||
|
||||
URLMainThread::CreateObjectURL(aGlobal, aStream, aResult, aRv);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user