Commit 909aec72 authored by Johann's avatar Johann Committed by Commit Bot

time zone: document non-heap mojo receiver

Most mojo Receiver/Remote objects are getting moved to the heap so they
can be managed by Oilpan. Document exceptions.

Change-Id: I55436d89ff1dd72273e42c1870e0b5c543ba8f92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2098152Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Commit-Queue: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751565}
parent 3374c120
...@@ -108,6 +108,9 @@ void TimeZoneController::Init() { ...@@ -108,6 +108,9 @@ void TimeZoneController::Init() {
if (!CanInitializeMojo()) if (!CanInitializeMojo())
return; return;
// monitor must not use HeapMojoRemote. TimeZoneController is not managed by
// Oilpan. monitor is only used to bind receiver_ here and never used
// again.
mojo::Remote<device::mojom::blink::TimeZoneMonitor> monitor; mojo::Remote<device::mojom::blink::TimeZoneMonitor> monitor;
Platform::Current()->GetBrowserInterfaceBroker()->GetInterface( Platform::Current()->GetBrowserInterfaceBroker()->GetInterface(
monitor.BindNewPipeAndPassReceiver()); monitor.BindNewPipeAndPassReceiver());
......
...@@ -53,6 +53,8 @@ class CORE_EXPORT TimeZoneController final ...@@ -53,6 +53,8 @@ class CORE_EXPORT TimeZoneController final
// device::mojom::blink::TimeZoneMonitorClient: // device::mojom::blink::TimeZoneMonitorClient:
void OnTimeZoneChange(const String& timezone_id) override; void OnTimeZoneChange(const String& timezone_id) override;
// receiver_ must not use HeapMojoReceiver. TimeZoneController is not managed
// by Oilpan.
mojo::Receiver<device::mojom::blink::TimeZoneMonitorClient> receiver_{this}; mojo::Receiver<device::mojom::blink::TimeZoneMonitorClient> receiver_{this};
String host_timezone_id_; String host_timezone_id_;
......
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