[Cocoa] Can't use bundle-defined classes for bundle parameters
https://bugs.webkit.org/show_bug.cgi?id=133339

Reviewed by Anders Carlsson.

Ensure that bundle parameters are decoded only after the injected bundle is loaded.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
lagacy initializationUserData as a parameter, and made this function set the sandbox
extension and load the bundle.
(WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::setSandboxExtension): Deleted.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
creation parameters as a parameter. Moved code to initialize the bundle paramters from
platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
NSObject, to allow arbitrary types in the values, and added an assertion that the
top-level object is a dictionary.
(WebKit::InjectedBundle::platformInitialize): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
data to InjectedBundle::create() and removed code to separately set the sandbox extension
and load the bundle, which is now done by create().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169422 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130081

Reviewed by Martin Robinson.

* Platform/WorkQueue.h:
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::registerSocketEventHandler): Stop pretending it's
possible to register a socket event handler for more than one
descriptor.
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfter):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::~DownloadClient):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::handleResponse):
(WebKit::DownloadClient::handleResponseLater):
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::~PluginInfoCache):
(WebKit::PluginInfoCache::saveToFile):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::scheduleLayerFlush):
(WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169423 268f45cc-cd09-0410-ab3c-d52691b4dbfc