Diff
Modified: trunk/Source/WebKit2/ChangeLog (183411 => 183412)
--- trunk/Source/WebKit2/ChangeLog 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/ChangeLog 2015-04-27 20:15:12 UTC (rev 183412)
@@ -1,5 +1,58 @@
2015-04-27 Zan Dobersek <[email protected]>
+ [WK2] API::Dictionary creation functions should return Ref<>
+ https://bugs.webkit.org/show_bug.cgi?id=144221
+
+ Reviewed by Darin Adler.
+
+ Have API::Dictionary creation functions return Ref<>.
+ The call-sites are also updated, using and operating
+ on the returned Ref<> object where possible.
+
+ * Shared/API/APIDictionary.cpp:
+ (API::Dictionary::create):
+ * Shared/API/APIDictionary.h:
+ * Shared/API/Cocoa/WKRemoteObjectCoder.mm:
+ (createEncodedObject):
+ * Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
+ (-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
+ * Shared/API/c/WKDictionary.cpp:
+ (WKDictionaryCreate):
+ * Shared/API/c/WKMutableDictionary.cpp:
+ (WKMutableDictionaryCreate):
+ * Shared/Plugins/Netscape/PluginInformation.cpp:
+ (WebKit::createPluginInformationDictionary):
+ * Shared/Plugins/Netscape/PluginInformation.h:
+ * UIProcess/API/C/WKPage.cpp:
+ (WKPageSetPageUIClient):
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_prefetch_dns):
+ * UIProcess/API/gtk/WebKitWebView.cpp:
+ (webkit_web_view_get_snapshot):
+ * UIProcess/Plugins/PlugInAutoStartProvider.cpp:
+ (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
+ * UIProcess/Plugins/PlugInAutoStartProvider.h:
+ * UIProcess/StatisticsRequest.cpp:
+ (WebKit::createDictionaryFromHashMap):
+ (WebKit::StatisticsRequest::completedRequest):
+ * UIProcess/WebFormClient.cpp:
+ (WebKit::WebFormClient::willSubmitForm):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didFailToInitializePlugin):
+ * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
+ (didInitiateLoadForResource):
+ (willSendRequestForFrame):
+ (didReceiveResponseForResource):
+ (didReceiveContentLengthForResource):
+ (didFinishLoadForResource):
+ (didFailLoadForResource):
+ (webkitWebPageDidReceiveMessage):
+ * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
+ (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent):
+ (WebKit::InjectedBundlePageFormClient::willSubmitForm):
+
+2015-04-27 Zan Dobersek <[email protected]>
+
[WK2] API::Data creation functions should return Ref<>
https://bugs.webkit.org/show_bug.cgi?id=144220
Modified: trunk/Source/WebKit2/Shared/API/APIDictionary.cpp (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/APIDictionary.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/APIDictionary.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -31,14 +31,14 @@
namespace API {
-RefPtr<Dictionary> Dictionary::create()
+Ref<Dictionary> Dictionary::create()
{
return create({ });
}
-RefPtr<Dictionary> Dictionary::create(MapType map)
+Ref<Dictionary> Dictionary::create(MapType map)
{
- return adoptRef(new Dictionary(WTF::move(map)));
+ return adoptRef(*new Dictionary(WTF::move(map)));
}
Dictionary::Dictionary(MapType map)
Modified: trunk/Source/WebKit2/Shared/API/APIDictionary.h (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/APIDictionary.h 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/APIDictionary.h 2015-04-27 20:15:12 UTC (rev 183412)
@@ -28,7 +28,6 @@
#include "APIObject.h"
#include <wtf/HashMap.h>
-#include <wtf/PassRefPtr.h>
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
@@ -40,8 +39,8 @@
public:
typedef HashMap<WTF::String, RefPtr<Object>> MapType;
- static RefPtr<Dictionary> create();
- static RefPtr<Dictionary> create(MapType);
+ static Ref<Dictionary> create();
+ static Ref<Dictionary> create(MapType);
virtual ~Dictionary();
Modified: trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectCoder.mm 2015-04-27 20:15:12 UTC (rev 183412)
@@ -45,7 +45,7 @@
static NSString * const selectorKey = @"selector";
static NSString * const typeStringKey = @"typeString";
-static PassRefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *, id);
+static RefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *, id);
@interface NSMethodSignature (Details)
- (NSString *)_typeString;
@@ -238,17 +238,17 @@
[object encodeWithCoder:encoder];
}
-static PassRefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *encoder, id object)
+static RefPtr<API::Dictionary> createEncodedObject(WKRemoteObjectEncoder *encoder, id object)
{
if (!object)
return nil;
- RefPtr<API::Dictionary> dictionary = API::Dictionary::create();
- TemporaryChange<API::Dictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.get());
+ Ref<API::Dictionary> dictionary = API::Dictionary::create();
+ TemporaryChange<API::Dictionary*> dictionaryChange(encoder->_currentDictionary, dictionary.ptr());
encodeObject(encoder, object);
- return dictionary;
+ return WTF::move(dictionary);
}
- (void)encodeValueOfObjCType:(const char *)type at:(const void *)address
Modified: trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/_WKRemoteObjectRegistry.mm 2015-04-27 20:15:12 UTC (rev 183412)
@@ -102,14 +102,14 @@
RetainPtr<WKRemoteObjectEncoder> encoder = adoptNS([[WKRemoteObjectEncoder alloc] init]);
[encoder encodeObject:invocation forKey:invocationKey];
- RefPtr<API::Dictionary> body = API::Dictionary::create();
+ Ref<API::Dictionary> body = API::Dictionary::create();
body->set(interfaceIdentifierKey, API::String::create(interface.identifier));
body->set(encodedInvocationKey, [encoder rootObjectDictionary]);
if (!_remoteObjectRegistry)
return;
- _remoteObjectRegistry->sendInvocation(UserData(body.get()));
+ _remoteObjectRegistry->sendInvocation(UserData(body.ptr()));
}
- (WebKit::RemoteObjectRegistry&)remoteObjectRegistry
Modified: trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/c/WKDictionary.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -43,7 +43,7 @@
for (size_t i = 0; i < numberOfValues; ++i)
map.add(toImpl(keys[i])->string(), toImpl(values[i]));
- return toAPI(API::Dictionary::create(WTF::move(map)).release().leakRef());
+ return toAPI(&API::Dictionary::create(WTF::move(map)).leakRef());
}
WKTypeRef WKDictionaryGetItemForKey(WKDictionaryRef dictionaryRef, WKStringRef key)
Modified: trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp (183411 => 183412)
--- trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/API/c/WKMutableDictionary.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -33,8 +33,7 @@
WKMutableDictionaryRef WKMutableDictionaryCreate()
{
- RefPtr<API::Dictionary> dictionary = API::Dictionary::create();
- return const_cast<WKMutableDictionaryRef>(toAPI(dictionary.release().leakRef()));
+ return const_cast<WKMutableDictionaryRef>(toAPI(&API::Dictionary::create().leakRef()));
}
bool WKDictionarySetItem(WKMutableDictionaryRef dictionaryRef, WKStringRef keyRef, WKTypeRef itemRef)
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp (183411 => 183412)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -122,7 +122,7 @@
#endif
}
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin)
+Ref<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin)
{
API::Dictionary::MapType map;
getPluginModuleInformation(plugin, map);
@@ -130,7 +130,7 @@
return API::Dictionary::create(WTF::move(map));
}
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured)
+Ref<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo& plugin, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured)
{
API::Dictionary::MapType map;
getPluginModuleInformation(plugin, map);
@@ -150,7 +150,7 @@
return API::Dictionary::create(WTF::move(map));
}
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString)
+Ref<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString)
{
API::Dictionary::MapType map;
Modified: trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h (183411 => 183412)
--- trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/Shared/Plugins/Netscape/PluginInformation.h 2015-04-27 20:15:12 UTC (rev 183412)
@@ -51,9 +51,9 @@
String pluginInformationPluginURLKey();
String plugInInformationReplacementObscuredKey();
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&);
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured = false);
-PassRefPtr<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
+Ref<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&);
+Ref<API::Dictionary> createPluginInformationDictionary(const PluginModuleInfo&, const String& frameURLString, const String& mimeType, const String& pageURLString, const String& pluginspageAttributeURLString, const String& pluginURLString, bool replacementObscured = false);
+Ref<API::Dictionary> createPluginInformationDictionary(const String& mimeType, const String& frameURLString, const String& pageURLString);
void getPluginModuleInformation(const PluginModuleInfo&, API::Dictionary::MapType&);
void getPlatformPluginModuleInformation(const PluginModuleInfo&, API::Dictionary::MapType&);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -1343,13 +1343,13 @@
map.set("resizable", API::Boolean::create(windowFeatures.resizable));
map.set("fullscreen", API::Boolean::create(windowFeatures.fullscreen));
map.set("dialog", API::Boolean::create(windowFeatures.dialog));
- RefPtr<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map));
+ Ref<API::Dictionary> featuresMap = API::Dictionary::create(WTF::move(map));
if (!m_client.base.version)
- return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.get()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
+ return adoptRef(toImpl(m_client.createNewPage_deprecatedForUseWithV0(toAPI(page), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
RefPtr<API::URLRequest> request = API::URLRequest::create(resourceRequest);
- return adoptRef(toImpl(m_client.createNewPage(toAPI(page), toAPI(request.get()), toAPI(featuresMap.get()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
+ return adoptRef(toImpl(m_client.createNewPage(toAPI(page), toAPI(request.get()), toAPI(featuresMap.ptr()), toAPI(navigationActionData.modifiers), toAPI(navigationActionData.mouseButton), m_client.base.clientInfo)));
}
virtual void showPage(WebPageProxy* page) override
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -1009,7 +1009,7 @@
API::Dictionary::MapType message;
message.set(String::fromUTF8("Hostname"), API::String::create(String::fromUTF8(hostname)));
- context->priv->context->postMessageToInjectedBundle(String::fromUTF8("PrefetchDNS"), API::Dictionary::create(WTF::move(message)).get());
+ context->priv->context->postMessageToInjectedBundle(String::fromUTF8("PrefetchDNS"), API::Dictionary::create(WTF::move(message)).ptr());
}
/**
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -3502,7 +3502,7 @@
message.set(String::fromUTF8("TransparentBackground"), API::Boolean::create(options & WEBKIT_SNAPSHOT_OPTIONS_TRANSPARENT_BACKGROUND));
webView->priv->snapshotResultsMap.set(callbackID, adoptGRef(g_task_new(webView, cancellable, callback, userData)));
- getPage(webView)->postMessageToInjectedBundle(String::fromUTF8("GetSnapshot"), API::Dictionary::create(WTF::move(message)).get());
+ getPage(webView)->postMessageToInjectedBundle(String::fromUTF8("GetSnapshot"), API::Dictionary::create(WTF::move(message)).ptr());
}
/**
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -87,7 +87,7 @@
return sessionMap;
}
-PassRefPtr<API::Dictionary> PlugInAutoStartProvider::autoStartOriginsTableCopy() const
+Ref<API::Dictionary> PlugInAutoStartProvider::autoStartOriginsTableCopy() const
{
API::Dictionary::MapType map;
Modified: trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/Plugins/PlugInAutoStartProvider.h 2015-04-27 20:15:12 UTC (rev 183412)
@@ -56,7 +56,7 @@
void addAutoStartOriginHash(const String& pageOrigin, unsigned plugInOriginHash, WebCore::SessionID);
void didReceiveUserInteraction(unsigned plugInOriginHash, WebCore::SessionID);
- PassRefPtr<API::Dictionary> autoStartOriginsTableCopy() const;
+ Ref<API::Dictionary> autoStartOriginsTableCopy() const;
void setAutoStartOriginsTable(API::Dictionary&);
void setAutoStartOriginsFilteringOutEntriesAddedAfterTime(API::Dictionary&, double time);
void setAutoStartOriginsArray(API::Array&);
Modified: trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/StatisticsRequest.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -58,10 +58,10 @@
dictionary->set(it->key, RefPtr<API::UInt64>(API::UInt64::create(it->value)).get());
}
-static PassRefPtr<API::Dictionary> createDictionaryFromHashMap(const HashMap<String, uint64_t>& map)
+static Ref<API::Dictionary> createDictionaryFromHashMap(const HashMap<String, uint64_t>& map)
{
- RefPtr<API::Dictionary> result = API::Dictionary::create();
- addToDictionaryFromHashMap(result.get(), map);
+ Ref<API::Dictionary> result = API::Dictionary::create();
+ addToDictionaryFromHashMap(result.ptr(), map);
return result;
}
@@ -79,9 +79,9 @@
addToDictionaryFromHashMap(m_responseDictionary.get(), data.statisticsNumbers);
if (!data._javascript_ProtectedObjectTypeCounts.isEmpty())
- m_responseDictionary->set("_javascript_ProtectedObjectTypeCounts", createDictionaryFromHashMap(data._javascript_ProtectedObjectTypeCounts).get());
+ m_responseDictionary->set("_javascript_ProtectedObjectTypeCounts", createDictionaryFromHashMap(data._javascript_ProtectedObjectTypeCounts));
if (!data._javascript_ObjectTypeCounts.isEmpty())
- m_responseDictionary->set("_javascript_ObjectTypeCounts", createDictionaryFromHashMap(data._javascript_ObjectTypeCounts).get());
+ m_responseDictionary->set("_javascript_ObjectTypeCounts", createDictionaryFromHashMap(data._javascript_ObjectTypeCounts));
if (!data.webCoreCacheStatistics.isEmpty()) {
Vector<RefPtr<API::Object>> cacheStatistics;
Modified: trunk/Source/WebKit2/UIProcess/WebFormClient.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/WebFormClient.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/WebFormClient.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -49,8 +49,8 @@
API::Dictionary::MapType map;
for (size_t i = 0; i < textFieldValues.size(); ++i)
map.set(textFieldValues[i].first, API::String::create(textFieldValues[i].second));
- RefPtr<API::Dictionary> textFieldsMap = API::Dictionary::create(WTF::move(map));
- m_client.willSubmitForm(toAPI(&page), toAPI(&frame), toAPI(&sourceFrame), toAPI(textFieldsMap.get()), toAPI(userData), toAPI(&listener.get()), m_client.base.clientInfo);
+ Ref<API::Dictionary> textFieldsMap = API::Dictionary::create(WTF::move(map));
+ m_client.willSubmitForm(toAPI(&page), toAPI(&frame), toAPI(&sourceFrame), toAPI(textFieldsMap.ptr()), toAPI(userData), toAPI(&listener.get()), m_client.base.clientInfo);
}
} // namespace WebKit
Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (183411 => 183412)
--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -5202,7 +5202,7 @@
#if ENABLE(NETSCAPE_PLUGIN_API)
void WebPageProxy::didFailToInitializePlugin(const String& mimeType, const String& frameURLString, const String& pageURLString)
{
- m_loaderClient->didFailToInitializePlugin(*this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).get());
+ m_loaderClient->didFailToInitializePlugin(*this, createPluginInformationDictionary(mimeType, frameURLString, pageURLString).ptr());
}
void WebPageProxy::didBlockInsecurePluginVersion(const String& mimeType, const String& pluginURLString, const String& frameURLString, const String& pageURLString, bool replacementObscured)
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp (183411 => 183412)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -186,7 +186,7 @@
message.set(String::fromUTF8("Frame"), toImpl(frame));
message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
message.set(String::fromUTF8("Request"), toImpl(request));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidInitiateLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidInitiateLoadForResource"), API::Dictionary::create(WTF::move(message)).ptr());
}
static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef wkRequest, WKURLResponseRef wkRedirectResponse, const void* clientInfo)
@@ -211,7 +211,7 @@
message.set(String::fromUTF8("Request"), newRequest.get());
if (!redirectResourceResponse.isNull())
message.set(String::fromUTF8("RedirectResponse"), toImpl(wkRedirectResponse));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidSendRequestForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidSendRequestForResource"), API::Dictionary::create(WTF::move(message)).ptr());
return toAPI(newRequest.release().leakRef());
}
@@ -222,7 +222,7 @@
message.set(String::fromUTF8("Page"), toImpl(page));
message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
message.set(String::fromUTF8("Response"), toImpl(response));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveResponseForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveResponseForResource"), API::Dictionary::create(WTF::move(message)).ptr());
}
static void didReceiveContentLengthForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, uint64_t length, const void*)
@@ -231,7 +231,7 @@
message.set(String::fromUTF8("Page"), toImpl(page));
message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
message.set(String::fromUTF8("ContentLength"), API::UInt64::create(length));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveContentLengthForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidReceiveContentLengthForResource"), API::Dictionary::create(WTF::move(message)).ptr());
}
static void didFinishLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, const void*)
@@ -239,7 +239,7 @@
API::Dictionary::MapType message;
message.set(String::fromUTF8("Page"), toImpl(page));
message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFinishLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFinishLoadForResource"), API::Dictionary::create(WTF::move(message)).ptr());
}
static void didFailLoadForResource(WKBundlePageRef page, WKBundleFrameRef, uint64_t identifier, WKErrorRef error, const void*)
@@ -248,7 +248,7 @@
message.set(String::fromUTF8("Page"), toImpl(page));
message.set(String::fromUTF8("Identifier"), API::UInt64::create(identifier));
message.set(String::fromUTF8("Error"), toImpl(error));
- WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFailLoadForResource"), API::Dictionary::create(WTF::move(message)).get());
+ WebProcess::singleton().injectedBundle()->postMessage(String::fromUTF8("WebPage.DidFailLoadForResource"), API::Dictionary::create(WTF::move(message)).ptr());
}
class PageContextMenuClient final : public API::InjectedBundle::PageContextMenuClient {
@@ -500,7 +500,7 @@
messageReply.set("Page", webPage);
messageReply.set("CallbackID", API::UInt64::create(callbackID));
messageReply.set("Snapshot", snapshotImage);
- WebProcess::singleton().injectedBundle()->postMessage("WebPage.DidGetSnapshot", API::Dictionary::create(WTF::move(messageReply)).get());
+ WebProcess::singleton().injectedBundle()->postMessage("WebPage.DidGetSnapshot", API::Dictionary::create(WTF::move(messageReply)).ptr());
} else
ASSERT_NOT_REACHED();
}
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp (183411 => 183412)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp 2015-04-27 20:13:53 UTC (rev 183411)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp 2015-04-27 20:15:12 UTC (rev 183412)
@@ -138,7 +138,7 @@
map.set(values[i].first, API::String::create(values[i].second));
auto textFieldsMap = API::Dictionary::create(WTF::move(map));
- m_client.willSendSubmitEvent(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.get()), m_client.base.clientInfo);
+ m_client.willSendSubmitEvent(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.ptr()), m_client.base.clientInfo);
}
void InjectedBundlePageFormClient::willSubmitForm(WebPage* page, HTMLFormElement* formElement, WebFrame* frame, WebFrame* sourceFrame, const Vector<std::pair<String, String>>& values, RefPtr<API::Object>& userData)
@@ -154,7 +154,7 @@
auto textFieldsMap = API::Dictionary::create(WTF::move(map));
WKTypeRef userDataToPass = 0;
- m_client.willSubmitForm(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.get()), &userDataToPass, m_client.base.clientInfo);
+ m_client.willSubmitForm(toAPI(page), toAPI(nodeHandle.get()), toAPI(frame), toAPI(sourceFrame), toAPI(textFieldsMap.ptr()), &userDataToPass, m_client.base.clientInfo);
userData = adoptRef(toImpl(userDataToPass));
}