Summary: | Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching instead of in WebContext::ensureWebProcess | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Jessie Berlin <jberlin> | ||||
Component: | WebKit2 | Assignee: | Jessie Berlin <jberlin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | andersca, jberlin, sam | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Jessie Berlin
2010-10-26 12:49:14 PDT
Created attachment 71931 [details]
Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
Comment on attachment 71931 [details] Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching View in context: https://bugs.webkit.org/attachment.cgi?id=71931&action=review > WebKit2/UIProcess/WebContext.cpp:192 > + pair<String, RefPtr<APIObject> >* message = &m_pendingMessagesToPostToInjectedBundle[i]; > + m_process->send(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(message->first, WebContextUserMessageEncoder(message->second.get()))); You are just moving this code, and didn’t write it. I would have used a reference instead of a pointer here. (In reply to comment #2) > (From update of attachment 71931 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=71931&action=review > > > WebKit2/UIProcess/WebContext.cpp:192 > > + pair<String, RefPtr<APIObject> >* message = &m_pendingMessagesToPostToInjectedBundle[i]; > > + m_process->send(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(message->first, WebContextUserMessageEncoder(message->second.get()))); > > You are just moving this code, and didn’t write it. I would have used a reference instead of a pointer here. Actually, I believe that was me in http://trac.webkit.org/changeset/67593. Changed to be: pair<String, RefPtr<APIObject> >& message = m_pendingMessagesToPostToInjectedBundle[i]; m_process->send(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(message.first, WebContextUserMessageEncoder(message.second.get()))); Thanks for the review! Comment on attachment 71931 [details] Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching Committed in r70568 http://trac.webkit.org/changeset/70568 |