Commit e82b503b authored by Johann's avatar Johann Committed by Commit Bot

heap mojo: add mode to gamepad shared memory reader

The new wrapper changed the behavior slightly during the migration. The
wrapper defines a default ContextDestroyed method. If some other cleanup
method tries to access receiver_ it may crash. This change reverts to
the pre-migration behavior.

BUG=chromium:1049056

Change-Id: I9feafcf13c732664e8b10b6cba1a5258e3012e22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2131803Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarBrandon Jones <bajones@chromium.org>
Commit-Queue: Johann Koenig <johannkoenig@google.com>
Cr-Commit-Position: refs/heads/master@{#755569}
parent 341a1abe
......@@ -14,6 +14,7 @@
#include "mojo/public/cpp/system/buffer.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"
namespace base {
class ReadOnlySharedMemoryRegion;
......@@ -64,7 +65,9 @@ class GamepadSharedMemoryReader
bool ever_interacted_with_ = false;
HeapMojoReceiver<device::mojom::blink::GamepadObserver> receiver_;
HeapMojoReceiver<device::mojom::blink::GamepadObserver,
HeapMojoWrapperMode::kWithoutContextObserver>
receiver_;
mojo::Remote<device::mojom::blink::GamepadMonitor> gamepad_monitor_remote_;
blink::GamepadListener* listener_ = nullptr;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment