I'm also curious how Mojo integrates with the scheduler, in your example the Gelocation callbacks should happen based on when the scheduler thinks it's a good time to do so, which means I'd hope the IPC response task would be captured by the scheduler, and then executed at the correct time.In blink I'd like for us to move away from Timer<>, postTask, and other things and only ever execute async tasks through the scheduler. Mojo IPC responses should be included. Is this handled already through some MessageLoop magic?
On Fri, Oct 2, 2015 at 2:17 AM, Elliott Sprehn <esp...@chromium.org> wrote:I'd rather not allow ServiceProvider access from anywhere inside blink, having IPCs come from "anywhere" makes reasoning about the behavior of the system extremely difficult, especially given that Mojo has sync ipc wait primitives.
I think allowing this in platform/ is probably reasonable.I'm currently working on an architecture plan for blink that should make where we're going with layering, base, platform, wtf and IPCs more clear as well. I'll have it to share next week. :)
On Fri, 2 Oct 2015 at 17:37 Elliott Sprehn <esp...@chromium.org> wrote:I'm also curious how Mojo integrates with the scheduler, in your example the Gelocation callbacks should happen based on when the scheduler thinks it's a good time to do so, which means I'd hope the IPC response task would be captured by the scheduler, and then executed at the correct time.In blink I'd like for us to move away from Timer<>, postTask, and other things and only ever execute async tasks through the scheduler. Mojo IPC responses should be included. Is this handled already through some MessageLoop magic?In the renderer Mojo implicitly uses the scheduler's default task runner (it indirectly uses base::ThreadTaskRunnerHandle::Get(), which returns the scheduler's default task runner). I believe chrome IPC works similarly.On Fri, Oct 2, 2015 at 2:17 AM, Elliott Sprehn <esp...@chromium.org> wrote:I'd rather not allow ServiceProvider access from anywhere inside blink, having IPCs come from "anywhere" makes reasoning about the behavior of the system extremely difficult, especially given that Mojo has sync ipc wait primitives.
I think allowing this in platform/ is probably reasonable.I'm currently working on an architecture plan for blink that should make where we're going with layering, base, platform, wtf and IPCs more clear as well. I'll have it to share next week. :)Sounds great. I'm looking forward to it.
On Tue, Oct 6, 2015 at 12:32 AM, Sam McNally <sa...@chromium.org> wrote:On Fri, 2 Oct 2015 at 17:37 Elliott Sprehn <esp...@chromium.org> wrote:I'm also curious how Mojo integrates with the scheduler, in your example the Gelocation callbacks should happen based on when the scheduler thinks it's a good time to do so, which means I'd hope the IPC response task would be captured by the scheduler, and then executed at the correct time.In blink I'd like for us to move away from Timer<>, postTask, and other things and only ever execute async tasks through the scheduler. Mojo IPC responses should be included. Is this handled already through some MessageLoop magic?In the renderer Mojo implicitly uses the scheduler's default task runner (it indirectly uses base::ThreadTaskRunnerHandle::Get(), which returns the scheduler's default task runner). I believe chrome IPC works similarly.On Fri, Oct 2, 2015 at 2:17 AM, Elliott Sprehn <esp...@chromium.org> wrote:I'd rather not allow ServiceProvider access from anywhere inside blink, having IPCs come from "anywhere" makes reasoning about the behavior of the system extremely difficult, especially given that Mojo has sync ipc wait primitives.
I think allowing this in platform/ is probably reasonable.I'm currently working on an architecture plan for blink that should make where we're going with layering, base, platform, wtf and IPCs more clear as well. I'll have it to share next week. :)
Sounds great. I'm looking forward to it.By the way, it seems like it would be worth considering whether Blink should use Mojo IPC with //base or sans-//base. Either is possible.
On Tue, Oct 6, 2015 at 9:18 AM, Darin Fisher <da...@chromium.org> wrote:On Tue, Oct 6, 2015 at 12:32 AM, Sam McNally <sa...@chromium.org> wrote:On Fri, 2 Oct 2015 at 17:37 Elliott Sprehn <esp...@chromium.org> wrote:I'm also curious how Mojo integrates with the scheduler, in your example the Gelocation callbacks should happen based on when the scheduler thinks it's a good time to do so, which means I'd hope the IPC response task would be captured by the scheduler, and then executed at the correct time.In blink I'd like for us to move away from Timer<>, postTask, and other things and only ever execute async tasks through the scheduler. Mojo IPC responses should be included. Is this handled already through some MessageLoop magic?In the renderer Mojo implicitly uses the scheduler's default task runner (it indirectly uses base::ThreadTaskRunnerHandle::Get(), which returns the scheduler's default task runner). I believe chrome IPC works similarly.On Fri, Oct 2, 2015 at 2:17 AM, Elliott Sprehn <esp...@chromium.org> wrote:I'd rather not allow ServiceProvider access from anywhere inside blink, having IPCs come from "anywhere" makes reasoning about the behavior of the system extremely difficult, especially given that Mojo has sync ipc wait primitives.
I think allowing this in platform/ is probably reasonable.I'm currently working on an architecture plan for blink that should make where we're going with layering, base, platform, wtf and IPCs more clear as well. I'll have it to share next week. :)Any updates on this plan?Sounds great. I'm looking forward to it.By the way, it seems like it would be worth considering whether Blink should use Mojo IPC with //base or sans-//base. Either is possible.Sam, is there anything stopping us from making an adapter to get a mojo::Callback from a WTF::Function?