To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAMWgRNa-hguHdHp7h910Ue%2Bd7gjv239t8ajgTbs3w2GM72L%2BXg%40mail.gmail.com.--
You received this message because you are subscribed to the Google Groups "platform-architecture-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to platform-architect...@chromium.org.
To post to this group, send email to platform-arc...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAFJcur8JUiG9%3Dm02kWxhJvHX63XiG-xtWRjBgcr2s4LARybu1A%40mail.gmail.com.
Not directly answering haraken's question but let me add some info.BackgroundTaskRunner (in Source/platform) uses base::Bind:It binds PassOwnPtr with base::Bind which is a surprise to me, because that means PassOwnPtr type leaks to the Chromium side. This seems unsafe because PassOwnPtr has "destructive" copy semantics like std::auto_ptr and base::Bind gives no warranty that PassOwnPtr is handled correctly. I think in this specific case PassOwnPtr should be converted to std::unique_ptr before calling base::Bind.
Using base::Bind in Blink is kinda tricky so it's best if we can avoid it.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/platform-architecture-dev/CAMWgRNb%3DX%2BJw8HiNOETVC-O-UeKBGWu-j3V1nn%2Buobq-dwsLxA%40mail.gmail.com.
Yes, I think that could be the way to go (and I think we're already doing in some places). I think all we'd like to make sure is to limit the context (e.g. directory) we allow base/bind for now, in order to avoid someone just finds out it's available in, say, platform/ and start using it wherever possible.