summaryrefslogtreecommitdiff
path: root/Source/WebKit2/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/Shared')
-rw-r--r--Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp3
-rw-r--r--Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h2
-rw-r--r--Source/WebKit2/Shared/WebCoreArgumentCoders.cpp37
-rw-r--r--Source/WebKit2/Shared/WebCoreArgumentCoders.h6
-rw-r--r--Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm2
5 files changed, 49 insertions, 1 deletions
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
index f53c26e6b..f5e5101ea 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.cpp
@@ -40,6 +40,7 @@ PluginProcessCreationParameters::PluginProcessCreationParameters()
void PluginProcessCreationParameters::encode(CoreIPC::ArgumentEncoder& encoder) const
{
encoder << pluginPath;
+ encoder.encodeEnum(processType);
encoder << supportsAsynchronousPluginInitialization;
encoder << minimumLifetime;
encoder << terminationTimeout;
@@ -55,6 +56,8 @@ bool PluginProcessCreationParameters::decode(CoreIPC::ArgumentDecoder* decoder,
{
if (!decoder->decode(result.pluginPath))
return false;
+ if (!decoder->decodeEnum(result.processType))
+ return false;
if (!decoder->decode(result.supportsAsynchronousPluginInitialization))
return false;
if (!decoder->decode(result.minimumLifetime))
diff --git a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
index a414212be..1b3f9ff27 100644
--- a/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
+++ b/Source/WebKit2/Shared/Plugins/PluginProcessCreationParameters.h
@@ -28,6 +28,7 @@
#if ENABLE(PLUGIN_PROCESS)
+#include "PluginProcess.h"
#include <wtf/text/WTFString.h>
#if PLATFORM(MAC)
@@ -48,6 +49,7 @@ struct PluginProcessCreationParameters {
static bool decode(CoreIPC::ArgumentDecoder*, PluginProcessCreationParameters&);
String pluginPath;
+ PluginProcess::Type processType;
bool supportsAsynchronousPluginInitialization;
double minimumLifetime;
diff --git a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
index 516b68b9b..12f387e5d 100644
--- a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
+++ b/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
@@ -28,6 +28,7 @@
#include "ShareableBitmap.h"
#include <WebCore/AuthenticationChallenge.h>
+#include <WebCore/Cookie.h>
#include <WebCore/Credential.h>
#include <WebCore/Cursor.h>
#include <WebCore/DatabaseDetails.h>
@@ -686,6 +687,42 @@ bool ArgumentCoder<CompositionUnderline>::decode(ArgumentDecoder* decoder, Compo
return true;
}
+
+void ArgumentCoder<Cookie>::encode(ArgumentEncoder& encoder, const Cookie& cookie)
+{
+ encoder << cookie.name;
+ encoder << cookie.value;
+ encoder << cookie.domain;
+ encoder << cookie.path;
+ encoder << cookie.expires;
+ encoder << cookie.httpOnly;
+ encoder << cookie.secure;
+ encoder << cookie.session;
+}
+
+bool ArgumentCoder<Cookie>::decode(ArgumentDecoder* decoder, Cookie& cookie)
+{
+ if (!decoder->decode(cookie.name))
+ return false;
+ if (!decoder->decode(cookie.value))
+ return false;
+ if (!decoder->decode(cookie.domain))
+ return false;
+ if (!decoder->decode(cookie.path))
+ return false;
+ if (!decoder->decode(cookie.expires))
+ return false;
+ if (!decoder->decode(cookie.httpOnly))
+ return false;
+ if (!decoder->decode(cookie.secure))
+ return false;
+ if (!decoder->decode(cookie.session))
+ return false;
+
+ return true;
+}
+
+
#if ENABLE(SQL_DATABASE)
void ArgumentCoder<DatabaseDetails>::encode(ArgumentEncoder& encoder, const DatabaseDetails& details)
{
diff --git a/Source/WebKit2/Shared/WebCoreArgumentCoders.h b/Source/WebKit2/Shared/WebCoreArgumentCoders.h
index e25314758..75b4acc59 100644
--- a/Source/WebKit2/Shared/WebCoreArgumentCoders.h
+++ b/Source/WebKit2/Shared/WebCoreArgumentCoders.h
@@ -52,6 +52,7 @@ namespace WebCore {
class UserStyleSheet;
class UserScript;
struct CompositionUnderline;
+ struct Cookie;
struct DictationAlternative;
struct DragSession;
struct FileChooserSettings;
@@ -207,6 +208,11 @@ template<> struct ArgumentCoder<WebCore::CompositionUnderline> {
static bool decode(ArgumentDecoder*, WebCore::CompositionUnderline&);
};
+template<> struct ArgumentCoder<WebCore::Cookie> {
+ static void encode(ArgumentEncoder&, const WebCore::Cookie&);
+ static bool decode(ArgumentDecoder*, WebCore::Cookie&);
+};
+
template<> struct ArgumentCoder<WebCore::DatabaseDetails> {
static void encode(ArgumentEncoder&, const WebCore::DatabaseDetails&);
static bool decode(ArgumentDecoder*, WebCore::DatabaseDetails&);
diff --git a/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm b/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm
index d19e981a5..d30e7e1a1 100644
--- a/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm
+++ b/Source/WebKit2/Shared/mac/ObjCObjectGraphCoders.mm
@@ -94,7 +94,7 @@ public:
type = typeFromObject(m_root);
if (type == UnknownType) {
- [NSException raise:NSInvalidArgumentException format:@"Can not encode objects of class type '%@'", NSStringFromClass([m_root class])];
+ [NSException raise:NSInvalidArgumentException format:@"Can not encode objects of class type '%@'", static_cast<NSString *>(NSStringFromClass([m_root class]))];
}
encoder << static_cast<uint32_t>(type);