Commit 90901b5d authored by weinig@apple.com's avatar weinig@apple.com

Give UserMessageEncoders WebProcessProxy reference (like the decoders already have)

https://bugs.webkit.org/show_bug.cgi?id=125053

Reviewed by Dan Bernstein.

- Give the UserMessageEncoders a process reference.
- Switch UserMessageDecoders to storing a process reference, rather than pointer.

* Shared/UserMessageCoders.h:
* Shared/mac/ObjCObjectGraphCoders.h:
* Shared/mac/ObjCObjectGraphCoders.mm:
* UIProcess/WebConnectionToWebProcess.cpp:
* UIProcess/WebContext.cpp:
* UIProcess/WebContextUserMessageCoders.h:
* UIProcess/WebPageProxy.cpp:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cdc759fa
2013-12-01 Sam Weinig <sam@webkit.org>
Give UserMessageEncoders WebProcessProxy reference (like the decoders already have)
https://bugs.webkit.org/show_bug.cgi?id=125053
Reviewed by Dan Bernstein.
- Give the UserMessageEncoders a process reference.
- Switch UserMessageDecoders to storing a process reference, rather than pointer.
* Shared/UserMessageCoders.h:
* Shared/mac/ObjCObjectGraphCoders.h:
* Shared/mac/ObjCObjectGraphCoders.mm:
* UIProcess/WebConnectionToWebProcess.cpp:
* UIProcess/WebContext.cpp:
* UIProcess/WebContextUserMessageCoders.h:
* UIProcess/WebPageProxy.cpp:
* WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
2013-12-01 Sam Weinig <sam@webkit.org>
[Cocoa] The PageLoadState::Observer is not being set on iOS
......
......@@ -71,7 +71,7 @@ namespace WebKit {
template<typename Owner>
class UserMessageEncoder {
public:
bool baseEncode(CoreIPC::ArgumentEncoder& encoder, API::Object::Type& type) const
bool baseEncode(CoreIPC::ArgumentEncoder& encoder, const Owner& coder, API::Object::Type& type) const
{
if (!m_root) {
encoder << static_cast<uint32_t>(API::Object::Type::Null);
......@@ -86,7 +86,7 @@ public:
API::Array* array = static_cast<API::Array*>(m_root);
encoder << static_cast<uint64_t>(array->size());
for (size_t i = 0; i < array->size(); ++i)
encoder << Owner(array->at(i));
encoder << Owner(coder, array->at(i));
return true;
}
case API::Object::Type::Dictionary: {
......@@ -98,7 +98,7 @@ public:
ImmutableDictionary::MapType::const_iterator end = map.end();
for (; it != end; ++it) {
encoder << it->key;
encoder << Owner(it->value.get());
encoder << Owner(coder, it->value.get());
}
return true;
}
......@@ -149,15 +149,15 @@ public:
}
case API::Object::Type::RenderLayer: {
WebRenderLayer* renderLayer = static_cast<WebRenderLayer*>(m_root);
encoder << Owner(renderLayer->renderer());
encoder << Owner(coder, renderLayer->renderer());
encoder << renderLayer->isReflection();
encoder << renderLayer->isClipping();
encoder << renderLayer->isClipped();
encoder << static_cast<uint32_t>(renderLayer->compositingLayerType());
encoder << renderLayer->absoluteBoundingBox();
encoder << Owner(renderLayer->negativeZOrderList());
encoder << Owner(renderLayer->normalFlowList());
encoder << Owner(renderLayer->positiveZOrderList());
encoder << Owner(coder, renderLayer->negativeZOrderList());
encoder << Owner(coder, renderLayer->normalFlowList());
encoder << Owner(coder, renderLayer->positiveZOrderList());
return true;
}
case API::Object::Type::RenderObject: {
......@@ -165,10 +165,10 @@ public:
encoder << renderObject->name();
encoder << renderObject->elementTagName();
encoder << renderObject->elementID();
encoder << Owner(renderObject->elementClassNames());
encoder << Owner(coder, renderObject->elementClassNames());
encoder << renderObject->absolutePosition();
encoder << renderObject->frameRect();
encoder << Owner(renderObject->children());
encoder << Owner(coder, renderObject->children());
return true;
}
case API::Object::Type::URL: {
......
......@@ -38,41 +38,43 @@ class WebProcessProxy;
class WebContextObjCObjectGraphEncoder {
public:
explicit WebContextObjCObjectGraphEncoder(ObjCObjectGraph*);
explicit WebContextObjCObjectGraphEncoder(ObjCObjectGraph*, WebProcessProxy&);
void encode(CoreIPC::ArgumentEncoder&) const;
private:
ObjCObjectGraph* m_objectGraph;
WebProcessProxy& m_process;
};
class WebContextObjCObjectGraphDecoder {
public:
explicit WebContextObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>&, WebProcessProxy*);
explicit WebContextObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>&, WebProcessProxy&);
static bool decode(CoreIPC::ArgumentDecoder&, WebContextObjCObjectGraphDecoder&);
private:
RefPtr<ObjCObjectGraph>& m_objectGraph;
WebProcessProxy* m_process;
WebProcessProxy& m_process;
};
class InjectedBundleObjCObjectGraphEncoder {
public:
explicit InjectedBundleObjCObjectGraphEncoder(ObjCObjectGraph*);
explicit InjectedBundleObjCObjectGraphEncoder(ObjCObjectGraph*, WebProcess&);
void encode(CoreIPC::ArgumentEncoder&) const;
private:
ObjCObjectGraph* m_objectGraph;
WebProcess& m_process;
};
class InjectedBundleObjCObjectGraphDecoder {
public:
explicit InjectedBundleObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>&, WebProcess*);
explicit InjectedBundleObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>&, WebProcess&);
static bool decode(CoreIPC::ArgumentDecoder&, InjectedBundleObjCObjectGraphDecoder&);
private:
RefPtr<ObjCObjectGraph>& m_objectGraph;
WebProcess* m_process;
WebProcess& m_process;
};
} // namespace WebKit
......
......@@ -91,7 +91,7 @@ static WebKitNSType typeFromObject(id object)
template<typename Owner>
class ObjCObjectGraphEncoder {
public:
bool baseEncode(CoreIPC::ArgumentEncoder& encoder, WebKitNSType& type) const
bool baseEncode(CoreIPC::ArgumentEncoder& encoder, const Owner& coder, WebKitNSType& type) const
{
if (!m_root) {
encoder << static_cast<uint32_t>(NullType);
......@@ -117,7 +117,7 @@ public:
encoder << static_cast<uint64_t>(size);
for (NSUInteger i = 0; i < size; ++i)
encoder << Owner([array objectAtIndex:i]);
encoder << Owner(coder, [array objectAtIndex:i]);
return true;
}
case NSDictionaryType: {
......@@ -129,8 +129,8 @@ public:
NSArray *keys = [dictionary allKeys];
NSArray *values = [dictionary allValues];
for (NSUInteger i = 0; i < size; ++i) {
encoder << Owner([keys objectAtIndex:i]);
encoder << Owner([values objectAtIndex:i]);
encoder << Owner(coder, [keys objectAtIndex:i]);
encoder << Owner(coder, [values objectAtIndex:i]);
}
return true;
......@@ -268,15 +268,22 @@ class WebContextObjCObjectGraphEncoderImpl : public ObjCObjectGraphEncoder<WebCo
public:
typedef ObjCObjectGraphEncoder<WebContextObjCObjectGraphEncoderImpl> Base;
explicit WebContextObjCObjectGraphEncoderImpl(id root)
explicit WebContextObjCObjectGraphEncoderImpl(id root, WebProcessProxy& process)
: Base(root)
, m_process(process)
{
}
WebContextObjCObjectGraphEncoderImpl(const WebContextObjCObjectGraphEncoderImpl& userMessageEncoder, id root)
: Base(root)
, m_process(userMessageEncoder.m_process)
{
}
void encode(CoreIPC::ArgumentEncoder& encoder) const
{
WebKitNSType type = NullType;
if (baseEncode(encoder, type))
if (baseEncode(encoder, *this, type))
return;
switch (type) {
......@@ -289,7 +296,7 @@ public:
}
case WKTypeRefWrapperType: {
WKTypeRefWrapper *wrapper = static_cast<WKTypeRefWrapper *>(m_root);
encoder << WebContextUserMessageEncoder(toImpl(wrapper.object));
encoder << WebContextUserMessageEncoder(toImpl(wrapper.object), m_process);
break;
}
#endif
......@@ -298,6 +305,9 @@ public:
break;
}
}
private:
WebProcessProxy& m_process;
};
......@@ -305,7 +315,7 @@ class WebContextObjCObjectGraphDecoderImpl : public ObjCObjectGraphDecoder<WebCo
public:
typedef ObjCObjectGraphDecoder<WebContextObjCObjectGraphDecoderImpl> Base;
WebContextObjCObjectGraphDecoderImpl(RetainPtr<id>& root, WebProcessProxy* process)
WebContextObjCObjectGraphDecoderImpl(RetainPtr<id>& root, WebProcessProxy& process)
: Base(root)
, m_process(process)
{
......@@ -338,7 +348,7 @@ public:
if (!decoder.decode(pageID))
return false;
WebPageProxy* webPage = coder.m_process->webPage(pageID);
WebPageProxy* webPage = coder.m_process.webPage(pageID);
if (!webPage)
coder.m_root = [NSNull null];
else
......@@ -362,7 +372,7 @@ public:
}
private:
WebProcessProxy* m_process;
WebProcessProxy& m_process;
};
......@@ -372,15 +382,22 @@ class InjectedBundleObjCObjectGraphEncoderImpl : public ObjCObjectGraphEncoder<I
public:
typedef ObjCObjectGraphEncoder<InjectedBundleObjCObjectGraphEncoderImpl> Base;
explicit InjectedBundleObjCObjectGraphEncoderImpl(id root)
explicit InjectedBundleObjCObjectGraphEncoderImpl(id root, WebProcess& process)
: Base(root)
, m_process(process)
{
}
explicit InjectedBundleObjCObjectGraphEncoderImpl(const InjectedBundleObjCObjectGraphEncoderImpl& encoder, id root)
: Base(root)
, m_process(encoder.m_process)
{
}
void encode(CoreIPC::ArgumentEncoder& encoder) const
{
WebKitNSType type = NullType;
if (baseEncode(encoder, type))
if (baseEncode(encoder, *this, type))
return;
switch (type) {
......@@ -401,13 +418,16 @@ public:
break;
}
}
private:
WebProcess& m_process;
};
class InjectedBundleObjCObjectGraphDecoderImpl : public ObjCObjectGraphDecoder<InjectedBundleObjCObjectGraphDecoderImpl> {
public:
typedef ObjCObjectGraphDecoder<InjectedBundleObjCObjectGraphDecoderImpl> Base;
InjectedBundleObjCObjectGraphDecoderImpl(RetainPtr<id>& root, WebProcess* process)
InjectedBundleObjCObjectGraphDecoderImpl(RetainPtr<id>& root, WebProcess& process)
: Base(root)
, m_process(process)
{
......@@ -440,7 +460,7 @@ public:
if (!decoder.decode(pageID))
return false;
WebPage* webPage = coder.m_process->webPage(pageID);
WebPage* webPage = coder.m_process.webPage(pageID);
if (!webPage)
coder.m_root = [NSNull null];
else
......@@ -464,23 +484,24 @@ public:
}
private:
WebProcess* m_process;
WebProcess& m_process;
};
// Adaptors
WebContextObjCObjectGraphEncoder::WebContextObjCObjectGraphEncoder(ObjCObjectGraph* objectGraph)
WebContextObjCObjectGraphEncoder::WebContextObjCObjectGraphEncoder(ObjCObjectGraph* objectGraph, WebProcessProxy& process)
: m_objectGraph(objectGraph)
, m_process(process)
{
}
void WebContextObjCObjectGraphEncoder::encode(CoreIPC::ArgumentEncoder& encoder) const
{
encoder << WebContextObjCObjectGraphEncoderImpl(m_objectGraph->rootObject());
encoder << WebContextObjCObjectGraphEncoderImpl(m_objectGraph->rootObject(), m_process);
}
WebContextObjCObjectGraphDecoder::WebContextObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>& objectGraph, WebProcessProxy* process)
WebContextObjCObjectGraphDecoder::WebContextObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>& objectGraph, WebProcessProxy& process)
: m_objectGraph(objectGraph)
, m_process(process)
{
......@@ -497,17 +518,18 @@ bool WebContextObjCObjectGraphDecoder::decode(CoreIPC::ArgumentDecoder& decoder,
return true;
}
InjectedBundleObjCObjectGraphEncoder::InjectedBundleObjCObjectGraphEncoder(ObjCObjectGraph* objectGraph)
InjectedBundleObjCObjectGraphEncoder::InjectedBundleObjCObjectGraphEncoder(ObjCObjectGraph* objectGraph, WebProcess& process)
: m_objectGraph(objectGraph)
, m_process(process)
{
}
void InjectedBundleObjCObjectGraphEncoder::encode(CoreIPC::ArgumentEncoder& encoder) const
{
encoder << InjectedBundleObjCObjectGraphEncoderImpl(m_objectGraph->rootObject());
encoder << InjectedBundleObjCObjectGraphEncoderImpl(m_objectGraph->rootObject(), m_process);
}
InjectedBundleObjCObjectGraphDecoder::InjectedBundleObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>& objectGraph, WebProcess* process)
InjectedBundleObjCObjectGraphDecoder::InjectedBundleObjCObjectGraphDecoder(RefPtr<ObjCObjectGraph>& objectGraph, WebProcess& process)
: m_objectGraph(objectGraph)
, m_process(process)
{
......
......@@ -52,12 +52,12 @@ void WebConnectionToWebProcess::invalidate()
void WebConnectionToWebProcess::encodeMessageBody(CoreIPC::ArgumentEncoder& encoder, API::Object* messageBody)
{
encoder << WebContextUserMessageEncoder(messageBody);
encoder << WebContextUserMessageEncoder(messageBody, *m_process);
}
bool WebConnectionToWebProcess::decodeMessageBody(CoreIPC::ArgumentDecoder& decoder, RefPtr<API::Object>& messageBody)
{
WebContextUserMessageDecoder messageBodyDecoder(messageBody, m_process);
WebContextUserMessageDecoder messageBodyDecoder(messageBody, *m_process);
return decoder.decode(messageBodyDecoder);
}
......
......@@ -594,7 +594,7 @@ WebProcessProxy& WebContext::createNewWebProcess()
RefPtr<API::Object> injectedBundleInitializationUserData = m_injectedBundleClient.getInjectedBundleInitializationUserData(this);
if (!injectedBundleInitializationUserData)
injectedBundleInitializationUserData = m_injectedBundleInitializationUserData;
process->send(Messages::WebProcess::InitializeWebProcess(parameters, WebContextUserMessageEncoder(injectedBundleInitializationUserData.get())), 0);
process->send(Messages::WebProcess::InitializeWebProcess(parameters, WebContextUserMessageEncoder(injectedBundleInitializationUserData.get(), *process)), 0);
if (WebPreferences::anyPageGroupsAreUsingPrivateBrowsing())
process->send(Messages::WebProcess::EnsurePrivateBrowsingSession(), 0);
......@@ -608,7 +608,7 @@ WebProcessProxy& WebContext::createNewWebProcess()
CoreIPC::ArgumentEncoder messageData;
messageData.encode(message.first);
messageData.encode(WebContextUserMessageEncoder(message.second.get()));
messageData.encode(WebContextUserMessageEncoder(message.second.get(), *process));
process->send(Messages::WebProcess::PostInjectedBundleMessage(CoreIPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
}
m_messagesToInjectedBundlePostedToEmptyContext.clear();
......@@ -784,14 +784,14 @@ void WebContext::postMessageToInjectedBundle(const String& messageName, API::Obj
return;
}
// FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
for (auto process : m_processes) {
// FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
CoreIPC::ArgumentEncoder messageData;
messageData.encode(messageName);
messageData.encode(WebContextUserMessageEncoder(messageBody, *process.get()));
CoreIPC::ArgumentEncoder messageData;
messageData.encode(messageName);
messageData.encode(WebContextUserMessageEncoder(messageBody));
for (size_t i = 0; i < m_processes.size(); ++i)
m_processes[i]->send(Messages::WebProcess::PostInjectedBundleMessage(CoreIPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
process->send(Messages::WebProcess::PostInjectedBundleMessage(CoreIPC::DataReference(messageData.buffer(), messageData.bufferSize())), 0);
}
}
// InjectedBundle client
......@@ -955,7 +955,7 @@ void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes
&& decoder.messageName() == WebContextLegacyMessages::postMessageMessageName()) {
String messageName;
RefPtr<API::Object> messageBody;
WebContextUserMessageDecoder messageBodyDecoder(messageBody, WebProcessProxy::fromConnection(connection));
WebContextUserMessageDecoder messageBodyDecoder(messageBody, *WebProcessProxy::fromConnection(connection));
if (!decoder.decode(messageName))
return;
if (!decoder.decode(messageBodyDecoder))
......@@ -979,9 +979,11 @@ void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC:
&& decoder.messageName() == WebContextLegacyMessages::postSynchronousMessageMessageName()) {
// FIXME: We should probably encode something in the case that the arguments do not decode correctly.
WebProcessProxy* process = WebProcessProxy::fromConnection(connection);
String messageName;
RefPtr<API::Object> messageBody;
WebContextUserMessageDecoder messageBodyDecoder(messageBody, WebProcessProxy::fromConnection(connection));
WebContextUserMessageDecoder messageBodyDecoder(messageBody, *process);
if (!decoder.decode(messageName))
return;
if (!decoder.decode(messageBodyDecoder))
......@@ -989,7 +991,7 @@ void WebContext::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC:
RefPtr<API::Object> returnData;
didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody.get(), returnData);
replyEncoder->encode(WebContextUserMessageEncoder(returnData.get()));
replyEncoder->encode(WebContextUserMessageEncoder(returnData.get(), *process));
return;
}
......
......@@ -45,15 +45,22 @@ class WebContextUserMessageEncoder : public UserMessageEncoder<WebContextUserMes
public:
typedef UserMessageEncoder<WebContextUserMessageEncoder> Base;
explicit WebContextUserMessageEncoder(API::Object* root)
explicit WebContextUserMessageEncoder(API::Object* root, WebProcessProxy& process)
: Base(root)
, m_process(process)
{
}
WebContextUserMessageEncoder(const WebContextUserMessageEncoder& userMessageEncoder, API::Object* root)
: Base(root)
, m_process(userMessageEncoder.m_process)
{
}
void encode(CoreIPC::ArgumentEncoder& encoder) const
{
API::Object::Type type = API::Object::Type::Null;
if (baseEncode(encoder, type))
if (baseEncode(encoder, *this, type))
return;
switch (type) {
......@@ -75,7 +82,7 @@ public:
#if PLATFORM(MAC)
case API::Object::Type::ObjCObjectGraph: {
ObjCObjectGraph* objectGraph = static_cast<ObjCObjectGraph*>(m_root);
encoder << WebContextObjCObjectGraphEncoder(objectGraph);
encoder << WebContextObjCObjectGraphEncoder(objectGraph, m_process);
break;
}
#endif
......@@ -84,6 +91,9 @@ public:
break;
}
}
private:
WebProcessProxy& m_process;
};
// Adds
......@@ -95,7 +105,7 @@ class WebContextUserMessageDecoder : public UserMessageDecoder<WebContextUserMes
public:
typedef UserMessageDecoder<WebContextUserMessageDecoder> Base;
WebContextUserMessageDecoder(RefPtr<API::Object>& root, WebProcessProxy* process)
WebContextUserMessageDecoder(RefPtr<API::Object>& root, WebProcessProxy& process)
: Base(root)
, m_process(process)
{
......@@ -121,14 +131,14 @@ public:
uint64_t pageID;
if (!decoder.decode(pageID))
return false;
coder.m_root = coder.m_process->webPage(pageID);
coder.m_root = coder.m_process.webPage(pageID);
break;
}
case API::Object::Type::BundleFrame: {
uint64_t frameID;
if (!decoder.decode(frameID))
return false;
coder.m_root = coder.m_process->webFrame(frameID);
coder.m_root = coder.m_process.webFrame(frameID);
break;
}
case API::Object::Type::BundlePageGroup: {
......@@ -156,7 +166,7 @@ public:
}
private:
WebProcessProxy* m_process;
WebProcessProxy& m_process;
};
} // namespace WebKit
......@@ -606,7 +606,7 @@ void WebPageProxy::loadURL(const String& url, API::Object* userData)
bool createdExtension = maybeInitializeSandboxExtensionHandle(URL(URL(), url), sandboxExtensionHandle);
if (createdExtension)
m_process->willAcquireUniversalFileReadSandboxExtension();
m_process->send(Messages::WebPage::LoadURL(url, sandboxExtensionHandle, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadURL(url, sandboxExtensionHandle, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -621,7 +621,7 @@ void WebPageProxy::loadURLRequest(WebURLRequest* urlRequest, API::Object* userDa
bool createdExtension = maybeInitializeSandboxExtensionHandle(urlRequest->resourceRequest().url(), sandboxExtensionHandle);
if (createdExtension)
m_process->willAcquireUniversalFileReadSandboxExtension();
m_process->send(Messages::WebPage::LoadURLRequest(urlRequest->resourceRequest(), sandboxExtensionHandle, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadURLRequest(urlRequest->resourceRequest(), sandboxExtensionHandle, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -648,7 +648,7 @@ void WebPageProxy::loadFile(const String& fileURLString, const String& resourceD
SandboxExtension::Handle sandboxExtensionHandle;
SandboxExtension::createHandle(resourceDirectoryPath, SandboxExtension::ReadOnly, sandboxExtensionHandle);
m_process->assumeReadAccessToBaseURL(resourceDirectoryURL);
m_process->send(Messages::WebPage::LoadURL(fileURL, sandboxExtensionHandle, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadURL(fileURL, sandboxExtensionHandle, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -658,7 +658,7 @@ void WebPageProxy::loadData(WebData* data, const String& MIMEType, const String&
reattachToWebProcess();
m_process->assumeReadAccessToBaseURL(baseURL);
m_process->send(Messages::WebPage::LoadData(data->dataReference(), MIMEType, encoding, baseURL, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadData(data->dataReference(), MIMEType, encoding, baseURL, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -668,7 +668,7 @@ void WebPageProxy::loadHTMLString(const String& htmlString, const String& baseUR
reattachToWebProcess();
m_process->assumeReadAccessToBaseURL(baseURL);
m_process->send(Messages::WebPage::LoadHTMLString(htmlString, baseURL, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadHTMLString(htmlString, baseURL, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -683,7 +683,7 @@ void WebPageProxy::loadAlternateHTMLString(const String& htmlString, const Strin
m_mainFrame->setUnreachableURL(unreachableURL);
m_process->assumeReadAccessToBaseURL(baseURL);
m_process->send(Messages::WebPage::LoadAlternateHTMLString(htmlString, baseURL, unreachableURL, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadAlternateHTMLString(htmlString, baseURL, unreachableURL, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -692,7 +692,7 @@ void WebPageProxy::loadPlainTextString(const String& string, API::Object* userDa
if (!isValid())
reattachToWebProcess();
m_process->send(Messages::WebPage::LoadPlainTextString(string, WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadPlainTextString(string, WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -701,7 +701,7 @@ void WebPageProxy::loadWebArchiveData(const WebData* webArchiveData, API::Object
if (!isValid())
reattachToWebProcess();
m_process->send(Messages::WebPage::LoadWebArchiveData(webArchiveData->dataReference(), WebContextUserMessageEncoder(userData)), m_pageID);
m_process->send(Messages::WebPage::LoadWebArchiveData(webArchiveData->dataReference(), WebContextUserMessageEncoder(userData, process())), m_pageID);
m_process->responsivenessTimer()->start();
}
......@@ -822,7 +822,7 @@ void WebPageProxy::shouldGoToBackForwardListItem(uint64_t itemID, bool& shouldGo
void WebPageProxy::willGoToBackForwardListItem(uint64_t itemID, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2075,7 +2075,7 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
m_pageLoadState.clearPendingAPIRequestURL();
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2095,7 +2095,7 @@ void WebPageProxy::didStartProvisionalLoadForFrame(uint64_t frameID, const Strin
void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String& url, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2114,7 +2114,7 @@ void WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t f
void WebPageProxy::didFailProvisionalLoadForFrame(uint64_t frameID, const ResourceError& error, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2145,7 +2145,7 @@ void WebPageProxy::clearLoadDependentCallbacks()
void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeType, uint32_t opaqueFrameLoadType, const CertificateInfo& certificateInfo, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2182,7 +2182,7 @@ void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeTyp
void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());
if (!decoder.decode(messageDecoder))
return;
......@@ -2195,7 +2195,7 @@ void WebPageProxy::didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::Mess
void WebPageProxy::didFinishLoadForFrame(uint64_t frameID, CoreIPC::MessageDecoder& decoder)
{
RefPtr<API::Object> userData;
WebContextUserMessageDecoder messageDecoder(userData, &m_process.get());
WebContextUserMessageDecoder messageDecoder(userData, process());