gecko-dev/dom/file/ipc/PFileCreator.ipdl
Andrea Marchesini 35bde55efd Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug
FileCreatorHelper creates a FileBlobImpl on the main-thread and, because of
this, we end up executing I/O operations on that thread, slowing down other
components.  With this patch, FileCreatorHelper logic is moved to PBackground.

That the 'type' getter is still called on the main-thread because FileBlobImpl
uses nsIMIMEService which is a non thread-safe component.

Differential Revision: https://phabricator.services.mozilla.com/D27641

--HG--
extra : moz-landing-system : lando
2019-04-26 17:53:07 +00:00

42 lines
795 B
Plaintext

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
include protocol PBackground;
include protocol PChildToParentStream;
include protocol PFileDescriptorSet;
include protocol PIPCBlobInputStream;
include protocol PParentToChildStream;
include IPCBlob;
namespace mozilla {
namespace ipc {
struct FileCreationSuccessResult
{
IPCBlob blob;
};
struct FileCreationErrorResult
{
nsresult errorCode;
};
union FileCreationResult
{
FileCreationSuccessResult;
FileCreationErrorResult;
};
protocol PFileCreator
{
manager PBackground;
child:
async __delete__(FileCreationResult aResult);
};
} // namespace ipc
} // namespace mozilla