WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48367
Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching instead of in WebContext::ensureWebProcess
https://bugs.webkit.org/show_bug.cgi?id=48367
Summary
Post any pending messages to the Injected Bundle in WebContext::processDidFin...
Jessie Berlin
Reported
2010-10-26 12:49:14 PDT
We currently post those pending Injected Bundle messages in WebContext::ensureWebProcess. However it is possible for messages to be sent to WebContext::postMessageToInjectedBundle in between the call to ensureWebProcess and the asychronous callback that results in WebProcessProxy::didFinishLaunching being called. During that time, the WebProcessProxy is invalid so messages in WebContext::postMessageToInjectedBundle get added to the m_pendingMessagesToPostToInjectedBundle and will never actually be sent. Instead, we should wait for the process to finish launching before we post the pending messages to the Injected Bundle (in WebContext::processDidFinishLaunching). <
rdar://problem/8595623
>
Attachments
Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
(2.38 KB, patch)
2010-10-26 12:53 PDT
,
Jessie Berlin
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jessie Berlin
Comment 1
2010-10-26 12:53:15 PDT
Created
attachment 71931
[details]
Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
Darin Adler
Comment 2
2010-10-26 13:30:42 PDT
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.
Jessie Berlin
Comment 3
2010-10-26 13:40:09 PDT
(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!
Jessie Berlin
Comment 4
2010-10-26 13:52:59 PDT
Comment on
attachment 71931
[details]
Post pending messages to the Injected Bundle in WebContext::processDidFinishLaunching Committed in
r70568
http://trac.webkit.org/changeset/70568
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug