author Alex Gaynor <>
Mon, 27 Nov 2017 14:37:34 -0600
changeset 403385 bcc0a91dd43feae18d4bf04d7db3d146035aa416
parent 363742 5e5dda793c3e0a93fa8a0f2c377dcb28a113e3e7
permissions -rw-r--r--
Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker This removes the need for the content process to have permissions to create new files on macOS, allowing more aggressive sandboxing. MozReview-Commit-ID: 8agL5jwxDSL

/* 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 */

#ifndef mozilla_dom_DocumentRendererParent
#define mozilla_dom_DocumentRendererParent

#include "gfxContext.h"
#include "mozilla/ipc/PDocumentRendererParent.h"
#include "nsCOMPtr.h"
#include "nsString.h"

class nsICanvasRenderingContextInternal;

namespace mozilla {
namespace ipc {

class DocumentRendererParent : public PDocumentRendererParent
    virtual ~DocumentRendererParent();

    void SetCanvasContext(nsICanvasRenderingContextInternal* aCanvas,
			  gfxContext* ctx);
    void DrawToCanvas(const nsIntSize& renderedSize,
		      const nsCString& aData);

    virtual void ActorDestroy(ActorDestroyReason aWhy) override;

    virtual mozilla::ipc::IPCResult Recv__delete__(const nsIntSize& renderedSize,
                                                   const nsCString& data) override;

    nsCOMPtr<nsICanvasRenderingContextInternal> mCanvas;
    RefPtr<gfxContext> mCanvasContext;


} // namespace ipc
} // namespace mozilla