mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828870 - All shared blobs must be immutable. r=khuey.
This commit is contained in:
parent
0be1b0b551
commit
72bed700f7
@ -34,6 +34,7 @@
|
||||
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsIMemoryInfoDumper.h"
|
||||
#include "nsIMutable.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsTObserverArray.h"
|
||||
#include "nsIObserver.h"
|
||||
@ -645,6 +646,13 @@ ContentChild::GetOrCreateActorForBlob(nsIDOMBlob* aBlob)
|
||||
// a real interface or something.
|
||||
nsDOMFileBase* blob = static_cast<nsDOMFileBase*>(aBlob);
|
||||
|
||||
// All blobs shared between processes must be immutable.
|
||||
nsCOMPtr<nsIMutable> mutableBlob = do_QueryInterface(aBlob);
|
||||
if (!mutableBlob || NS_FAILED(mutableBlob->SetMutable(false))) {
|
||||
NS_WARNING("Failed to make blob immutable!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(aBlob);
|
||||
if (remoteBlob) {
|
||||
BlobChild* actor =
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIFilePicker.h"
|
||||
#include "nsIMemoryReporter.h"
|
||||
#include "nsIMutable.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIRemoteBlob.h"
|
||||
@ -1519,6 +1520,13 @@ ContentParent::GetOrCreateActorForBlob(nsIDOMBlob* aBlob)
|
||||
// a real interface or something.
|
||||
nsDOMFileBase* blob = static_cast<nsDOMFileBase*>(aBlob);
|
||||
|
||||
// All blobs shared between processes must be immutable.
|
||||
nsCOMPtr<nsIMutable> mutableBlob = do_QueryInterface(aBlob);
|
||||
if (!mutableBlob || NS_FAILED(mutableBlob->SetMutable(false))) {
|
||||
NS_WARNING("Failed to make blob immutable!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRemoteBlob> remoteBlob = do_QueryInterface(aBlob);
|
||||
if (remoteBlob) {
|
||||
BlobParent* actor =
|
||||
|
Loading…
Reference in New Issue
Block a user