crosswalk-project/crosswalk — pull request #975 by jeez (2013-10-24 14:28:50+00:00)
Title: [Extensions] Fix race condition in Extensions registering.

Nowadays we are facing a race condition between the moment
we get the first XWalkExtensionRendererController::DidCreateScriptContext()
for a given RenderProcess and the moment we register the external extensions
at XWalkExtensionRendererController's external_extensions_client_.

This patch fixes this by inverting the registration order. Now
during the Client's initialization we synchronously ask the Server
for the extensions to register.

In addition to that, XWalkExtensionProcessMsg_RegisterExtensions
has also become a Sync message so we can guarantee all external
extensions have been loaded way before doing anything else on
the BrowserProcess (more specifically at
XWalkExtensionService::OnRenderProcessCreated()).