Index: Portfile
===================================================================
--- Portfile	(revision 135265)
+++ Portfile	(working copy)
@@ -77,7 +77,8 @@
         gstreamer.patch \
         leopard-platform.patch \
         leopard-malloc.patch \
-        libedit.patch
+        libedit.patch \
+        glib-2.44-GMutexLocker.patch
 
 conflicts_build     google-test
 
Index: files/glib-2.44-GMutexLocker.patch
===================================================================
--- files/glib-2.44-GMutexLocker.patch	(revision 0)
+++ files/glib-2.44-GMutexLocker.patch	(working copy)
@@ -0,0 +1,251 @@
+diff -ur Source/WebCore/platform/graphics/gstreamer.orig/VideoSinkGStreamer.cpp Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp
+--- Source/WebCore/platform/graphics/gstreamer.orig/VideoSinkGStreamer.cpp	2015-04-20 15:30:23.000000000 -0700
++++ Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp	2015-04-20 15:33:39.000000000 -0700
+@@ -118,7 +118,7 @@
+     WebKitVideoSink* sink = reinterpret_cast<WebKitVideoSink*>(data);
+     WebKitVideoSinkPrivate* priv = sink->priv;
+ 
+-    GMutexLocker lock(priv->bufferMutex);
++    WebCore::GMutexLocker lock(priv->bufferMutex);
+     GstBuffer* buffer = priv->buffer;
+     priv->buffer = 0;
+     priv->timeoutId = 0;
+@@ -140,7 +140,7 @@
+     WebKitVideoSink* sink = WEBKIT_VIDEO_SINK(baseSink);
+     WebKitVideoSinkPrivate* priv = sink->priv;
+ 
+-    GMutexLocker lock(priv->bufferMutex);
++    WebCore::GMutexLocker lock(priv->bufferMutex);
+ 
+     if (priv->unlocked)
+         return GST_FLOW_OK;
+@@ -279,7 +279,7 @@
+ 
+ static void unlockBufferMutex(WebKitVideoSinkPrivate* priv)
+ {
+-    GMutexLocker lock(priv->bufferMutex);
++    WebCore::GMutexLocker lock(priv->bufferMutex);
+ 
+     if (priv->buffer) {
+         gst_buffer_unref(priv->buffer);
+@@ -305,7 +305,7 @@
+     WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv;
+ 
+     {
+-        GMutexLocker lock(priv->bufferMutex);
++        WebCore::GMutexLocker lock(priv->bufferMutex);
+         priv->unlocked = false;
+     }
+ 
+@@ -330,7 +330,7 @@
+ {
+     WebKitVideoSinkPrivate* priv = WEBKIT_VIDEO_SINK(baseSink)->priv;
+ 
+-    GMutexLocker lock(priv->bufferMutex);
++    WebCore::GMutexLocker lock(priv->bufferMutex);
+     priv->unlocked = false;
+     return TRUE;
+ }
+Only in Source/WebCore/platform/graphics/gstreamer: VideoSinkGStreamer.cpp-e
+diff -ur Source/WebCore/platform/graphics/gstreamer.orig/WebKitWebSourceGStreamer.cpp Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp
+--- Source/WebCore/platform/graphics/gstreamer.orig/WebKitWebSourceGStreamer.cpp	2015-04-20 15:30:23.000000000 -0700
++++ Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp	2015-04-20 15:33:39.000000000 -0700
+@@ -346,7 +346,7 @@
+ 
+     switch (propID) {
+     case PROP_IRADIO_MODE: {
+-        GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++        WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+         priv->iradioMode = g_value_get_boolean(value);
+         break;
+     }
+@@ -364,7 +364,7 @@
+     WebKitWebSrc* src = WEBKIT_WEB_SRC(object);
+     WebKitWebSrcPrivate* priv = src->priv;
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     switch (propID) {
+     case PROP_IRADIO_MODE:
+         g_value_set_boolean(value, priv->iradioMode);
+@@ -417,7 +417,7 @@
+ 
+     ASSERT(isMainThread());
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+ 
+     bool seeking = priv->seekID;
+ 
+@@ -476,7 +476,7 @@
+ 
+     ASSERT(isMainThread());
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+ 
+     priv->startID = 0;
+     priv->corsAccessCheck = CORSNoCheck;
+@@ -573,7 +573,7 @@
+         return ret;
+     }
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     switch (transition) {
+     case GST_STATE_CHANGE_READY_TO_PAUSED:
+         GST_DEBUG_OBJECT(src, "READY->PAUSED");
+@@ -604,7 +604,7 @@
+         gst_query_parse_duration(query, &format, NULL);
+ 
+         GST_DEBUG_OBJECT(src, "duration query in format %s", gst_format_get_name(format));
+-        GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++        WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+         if (format == GST_FORMAT_BYTES && src->priv->size > 0) {
+             gst_query_set_duration(query, format, src->priv->size);
+             result = TRUE;
+@@ -612,7 +612,7 @@
+         break;
+     }
+     case GST_QUERY_URI: {
+-        GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++        WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+         gst_query_set_uri(query, src->priv->uri);
+         result = TRUE;
+         break;
+@@ -653,7 +653,7 @@
+     WebKitWebSrc* src = WEBKIT_WEB_SRC(handler);
+     gchar* ret;
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     ret = g_strdup(src->priv->uri);
+     return ret;
+ }
+@@ -668,7 +668,7 @@
+         return FALSE;
+     }
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+ 
+     g_free(priv->uri);
+     priv->uri = 0;
+@@ -704,7 +704,7 @@
+ 
+     ASSERT(isMainThread());
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     // already stopped
+     if (!priv->needDataID)
+         return FALSE;
+@@ -725,7 +725,7 @@
+ 
+     GST_DEBUG_OBJECT(src, "Need more data: %u", length);
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     if (priv->needDataID || !priv->paused) {
+         return;
+     }
+@@ -739,7 +739,7 @@
+ 
+     ASSERT(isMainThread());
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     // already stopped
+     if (!priv->enoughDataID)
+         return FALSE;
+@@ -760,7 +760,7 @@
+ 
+     GST_DEBUG_OBJECT(src, "Have enough data");
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     if (priv->enoughDataID || priv->paused) {
+         return;
+     }
+@@ -774,7 +774,7 @@
+ 
+     ASSERT(isMainThread());
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     // already stopped
+     if (!priv->seekID)
+         return FALSE;
+@@ -792,7 +792,7 @@
+     WebKitWebSrcPrivate* priv = src->priv;
+ 
+     GST_DEBUG_OBJECT(src, "Seeking to offset: %" G_GUINT64_FORMAT, offset);
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     if (offset == priv->offset && priv->requestedOffset == priv->offset)
+         return TRUE;
+ 
+@@ -811,7 +811,7 @@
+ void webKitWebSrcSetMediaPlayer(WebKitWebSrc* src, WebCore::MediaPlayer* player)
+ {
+     ASSERT(player);
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     src->priv->player = player;
+ }
+ 
+@@ -841,7 +841,7 @@
+ 
+     mapGstBuffer(buffer);
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     priv->buffer = adoptGRef(buffer);
+     locker.unlock();
+ 
+@@ -867,7 +867,7 @@
+         return;
+     }
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+ 
+     priv->corsAccessCheck = corsAccessCheck;
+ 
+@@ -966,7 +966,7 @@
+     WebKitWebSrc* src = WEBKIT_WEB_SRC(m_src);
+     WebKitWebSrcPrivate* priv = src->priv;
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+ 
+     GST_LOG_OBJECT(src, "Have %lld bytes of data", priv->buffer ? static_cast<long long>(gst_buffer_get_size(priv->buffer.get())) : length);
+ 
+@@ -1035,7 +1035,7 @@
+ 
+     GST_DEBUG_OBJECT(src, "Have EOS");
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     if (!priv->seekID) {
+         locker.unlock();
+         gst_app_src_end_of_stream(priv->appsrc);
+@@ -1194,7 +1194,7 @@
+ 
+     GST_ERROR_OBJECT(src, "Request was blocked");
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     uri.reset(g_strdup(src->priv->uri));
+     locker.unlock();
+ 
+@@ -1208,7 +1208,7 @@
+ 
+     GST_ERROR_OBJECT(src, "Cannot show URL");
+ 
+-    GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
++    WebCore::GMutexLocker locker(GST_OBJECT_GET_LOCK(src));
+     uri.reset(g_strdup(src->priv->uri));
+     locker.unlock();
+ 
+Only in Source/WebCore/platform/graphics/gstreamer: WebKitWebSourceGStreamer.cpp-e
