<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[181246] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/181246">181246</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2015-03-08 14:32:50 -0700 (Sun, 08 Mar 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
https://bugs.webkit.org/show_bug.cgi?id=142458
Reviewed by Dan Bernstein.
* Shared/WebCompiledContentExtensionData.cpp:
(WebKit::WebCompiledContentExtensionData::encode):
(WebKit::WebCompiledContentExtensionData::decode):
* Shared/WebCompiledContentExtensionData.h:
(WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
Store the compiled data as a SharedMemory block with offset/size pairs for the
bytecode and actions. While the bytecode offset is currently always 0, this won't
be the case when we map these in from files due to metadata that will be placed
at the top of the files.
* Shared/WebCompiledContentExtension.h:
* Shared/WebCompiledContentExtension.cpp:
(WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
Temporary creation helper. In subsequent patches, this will be removed and replaced
by always passing in shared/mapped data.
(WebKit::WebCompiledContentExtension::create):
(WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
(WebKit::WebCompiledContentExtension::bytecode):
(WebKit::WebCompiledContentExtension::bytecodeLength):
(WebKit::WebCompiledContentExtension::actions):
(WebKit::WebCompiledContentExtension::actionsLength):
Convert to work with the new WebCompiledContentExtension format.
* UIProcess/API/C/WKUserContentFilterRef.cpp:
(WKUserContentFilterCreate):
* UIProcess/API/Cocoa/_WKUserContentFilter.mm:
(-[_WKUserContentFilter initWithName:serializedRules:]):
Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserContentExtensions):
* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::addUserContentExtension):
Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensioncpp">trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensionh">trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensionDatacpp">trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCompiledContentExtensionDatah">trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefcpp">trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFiltermm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessUserContentWebUserContentControllercpp">trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageGroupProxycpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/ChangeLog        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -1,3 +1,46 @@
</span><ins>+2015-03-08 Sam Weinig <sam@webkit.org>
+
+ [Content Extensions] Pass compiled content extensions as read-only shared memory rather than copying them
+ https://bugs.webkit.org/show_bug.cgi?id=142458
+
+ Reviewed by Dan Bernstein.
+
+ * Shared/WebCompiledContentExtensionData.cpp:
+ (WebKit::WebCompiledContentExtensionData::encode):
+ (WebKit::WebCompiledContentExtensionData::decode):
+ * Shared/WebCompiledContentExtensionData.h:
+ (WebKit::WebCompiledContentExtensionData::WebCompiledContentExtensionData):
+ Store the compiled data as a SharedMemory block with offset/size pairs for the
+ bytecode and actions. While the bytecode offset is currently always 0, this won't
+ be the case when we map these in from files due to metadata that will be placed
+ at the top of the files.
+
+ * Shared/WebCompiledContentExtension.h:
+ * Shared/WebCompiledContentExtension.cpp:
+ (WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData):
+ Temporary creation helper. In subsequent patches, this will be removed and replaced
+ by always passing in shared/mapped data.
+
+ (WebKit::WebCompiledContentExtension::create):
+ (WebKit::WebCompiledContentExtension::WebCompiledContentExtension):
+ (WebKit::WebCompiledContentExtension::bytecode):
+ (WebKit::WebCompiledContentExtension::bytecodeLength):
+ (WebKit::WebCompiledContentExtension::actions):
+ (WebKit::WebCompiledContentExtension::actionsLength):
+ Convert to work with the new WebCompiledContentExtension format.
+
+ * UIProcess/API/C/WKUserContentFilterRef.cpp:
+ (WKUserContentFilterCreate):
+ * UIProcess/API/Cocoa/_WKUserContentFilter.mm:
+ (-[_WKUserContentFilter initWithName:serializedRules:]):
+ Switch to using WebCompiledContentExtension::createFromCompiledContentExtensionData().
+
+ * WebProcess/UserContent/WebUserContentController.cpp:
+ (WebKit::WebUserContentController::addUserContentExtensions):
+ * WebProcess/WebPage/WebPageGroupProxy.cpp:
+ (WebKit::WebPageGroupProxy::addUserContentExtension):
+ Update to pass the WebCompiledContentExtensionData directly to the WebCompiledContentExtension.
+
</ins><span class="cx"> 2015-03-08 Carlos Garcia Campos <cgarcia@igalia.com>
</span><span class="cx">
</span><span class="cx"> Remove willDestroyFrame in WKBundlePageLoaderClient
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.cpp        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -28,40 +28,58 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx">
</span><ins>+#include <WebCore/ContentExtensionCompiler.h>
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-Ref<WebCompiledContentExtension> WebCompiledContentExtension::create(Vector<WebCore::ContentExtensions::DFABytecode>&& bytecode, Vector<WebCore::ContentExtensions::SerializedActionByte>&& actions)
</del><ins>+Ref<WebCompiledContentExtension> WebCompiledContentExtension::createFromCompiledContentExtensionData(const WebCore::ContentExtensions::CompiledContentExtensionData& compilerData)
</ins><span class="cx"> {
</span><del>- return adoptRef(*new WebCompiledContentExtension(WTF::move(bytecode), WTF::move(actions)));
</del><ins>+ RefPtr<SharedMemory> sharedMemory = SharedMemory::create(compilerData.bytecode.size() + compilerData.actions.size());
+ memcpy(static_cast<char*>(sharedMemory->data()), compilerData.bytecode.data(), compilerData.bytecode.size());
+ memcpy(static_cast<char*>(sharedMemory->data()) + compilerData.bytecode.size(), compilerData.actions.data(), compilerData.actions.size());
+
+ WebCompiledContentExtensionData data;
+ data.data = WTF::move(sharedMemory);
+ data.bytecodeOffset = 0;
+ data.bytecodeSize = compilerData.bytecode.size();
+ data.actionsOffset = compilerData.bytecode.size();
+ data.actionsSize = compilerData.actions.size();
+
+ return create(WTF::move(data));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-WebCompiledContentExtension::WebCompiledContentExtension(Vector<WebCore::ContentExtensions::DFABytecode>&& bytecode, Vector<WebCore::ContentExtensions::SerializedActionByte>&& actions)
- : m_data { WTF::move(bytecode), WTF::move(actions) }
</del><ins>+Ref<WebCompiledContentExtension> WebCompiledContentExtension::create(WebCompiledContentExtensionData&& data)
</ins><span class="cx"> {
</span><ins>+ return adoptRef(*new WebCompiledContentExtension(WTF::move(data)));
</ins><span class="cx"> }
</span><span class="cx">
</span><ins>+WebCompiledContentExtension::WebCompiledContentExtension(WebCompiledContentExtensionData&& data)
+ : m_data(WTF::move(data))
+{
+}
+
</ins><span class="cx"> WebCompiledContentExtension::~WebCompiledContentExtension()
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const WebCore::ContentExtensions::DFABytecode* WebCompiledContentExtension::bytecode() const
</span><span class="cx"> {
</span><del>- return m_data.bytecode.data();
</del><ins>+ return static_cast<const WebCore::ContentExtensions::DFABytecode*>(m_data.data->data()) + m_data.bytecodeOffset;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned WebCompiledContentExtension::bytecodeLength() const
</span><span class="cx"> {
</span><del>- return m_data.bytecode.size();
</del><ins>+ return m_data.bytecodeSize;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const WebCore::ContentExtensions::SerializedActionByte* WebCompiledContentExtension::actions() const
</span><span class="cx"> {
</span><del>- return m_data.actions.data();
</del><ins>+ return static_cast<const WebCore::ContentExtensions::SerializedActionByte*>(m_data.data->data()) + m_data.actionsOffset;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> unsigned WebCompiledContentExtension::actionsLength() const
</span><span class="cx"> {
</span><del>- return m_data.actions.size();
</del><ins>+ return m_data.actionsSize;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtension.h        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -29,18 +29,28 @@
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx">
</span><span class="cx"> #include "WebCompiledContentExtensionData.h"
</span><ins>+#include <WebCore/CompiledContentExtension.h>
</ins><span class="cx">
</span><ins>+namespace WebCore {
+namespace ContentExtensions {
+struct CompiledContentExtensionData;
+}
+}
+
</ins><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><span class="cx"> class WebCompiledContentExtension final : public WebCore::ContentExtensions::CompiledContentExtension {
</span><span class="cx"> public:
</span><del>- static Ref<WebCompiledContentExtension> create(Vector<WebCore::ContentExtensions::DFABytecode>&&, Vector<WebCore::ContentExtensions::SerializedActionByte>&&);
</del><ins>+ // FIXME: Remove this once everyone is converted to using the UserContentExtensionStore.
+ static Ref<WebCompiledContentExtension> createFromCompiledContentExtensionData(const WebCore::ContentExtensions::CompiledContentExtensionData&);
+
+ static Ref<WebCompiledContentExtension> create(WebCompiledContentExtensionData&&);
</ins><span class="cx"> virtual ~WebCompiledContentExtension();
</span><span class="cx">
</span><span class="cx"> WebCompiledContentExtensionData data() const { return m_data; }
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- WebCompiledContentExtension(Vector<WebCore::ContentExtensions::DFABytecode>&&, Vector<WebCore::ContentExtensions::SerializedActionByte>&&);
</del><ins>+ WebCompiledContentExtension(WebCompiledContentExtensionData&&);
</ins><span class="cx">
</span><span class="cx"> virtual const WebCore::ContentExtensions::DFABytecode* bytecode() const override;
</span><span class="cx"> virtual unsigned bytecodeLength() const override;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.cpp        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -34,16 +34,33 @@
</span><span class="cx">
</span><span class="cx"> void WebCompiledContentExtensionData::encode(IPC::ArgumentEncoder& encoder) const
</span><span class="cx"> {
</span><del>- encoder << bytecode;
- encoder << actions;
</del><ins>+ SharedMemory::Handle handle;
+ data->createHandle(handle, SharedMemory::ReadOnly);
+ encoder << handle;
+
+ encoder << bytecodeOffset;
+ encoder << bytecodeSize;
+ encoder << actionsOffset;
+ encoder << actionsSize;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebCompiledContentExtensionData::decode(IPC::ArgumentDecoder& decoder, WebCompiledContentExtensionData& compiledContentExtensionData)
</span><span class="cx"> {
</span><del>- if (!decoder.decode(compiledContentExtensionData.bytecode))
</del><ins>+ SharedMemory::Handle handle;
+ if (!decoder.decode(handle))
</ins><span class="cx"> return false;
</span><del>- if (!decoder.decode(compiledContentExtensionData.actions))
</del><ins>+ compiledContentExtensionData.data = SharedMemory::create(handle, SharedMemory::ReadOnly);
+
+ if (!decoder.decode(compiledContentExtensionData.bytecodeOffset))
</ins><span class="cx"> return false;
</span><ins>+ if (!decoder.decode(compiledContentExtensionData.bytecodeSize))
+ return false;
+ if (!decoder.decode(compiledContentExtensionData.actionsOffset))
+ return false;
+ if (!decoder.decode(compiledContentExtensionData.actionsSize))
+ return false;
+
+
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCompiledContentExtensionDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/Shared/WebCompiledContentExtensionData.h        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -28,7 +28,8 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx">
</span><del>-#include <WebCore/CompiledContentExtension.h>
</del><ins>+#include "SharedMemory.h"
+#include <wtf/RefPtr.h>
</ins><span class="cx">
</span><span class="cx"> namespace IPC {
</span><span class="cx"> class ArgumentDecoder;
</span><span class="lines">@@ -39,11 +40,27 @@
</span><span class="cx">
</span><span class="cx"> class WebCompiledContentExtensionData {
</span><span class="cx"> public:
</span><ins>+ WebCompiledContentExtensionData()
+ {
+ }
+
+ WebCompiledContentExtensionData(RefPtr<SharedMemory> data, unsigned bytecodeOffset, unsigned bytecodeSize, unsigned actionsOffset, unsigned actionsSize)
+ : data(data)
+ , bytecodeOffset(bytecodeOffset)
+ , bytecodeSize(bytecodeSize)
+ , actionsOffset(actionsOffset)
+ , actionsSize(actionsSize)
+ {
+ }
+
</ins><span class="cx"> void encode(IPC::ArgumentEncoder&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, WebCompiledContentExtensionData&);
</span><span class="cx">
</span><del>- Vector<WebCore::ContentExtensions::DFABytecode> bytecode;
- Vector<WebCore::ContentExtensions::SerializedActionByte> actions;
</del><ins>+ RefPtr<SharedMemory> data;
+ unsigned bytecodeOffset { 0 };
+ unsigned bytecodeSize { 0 };
+ unsigned actionsOffset { 0 };
+ unsigned actionsSize { 0 };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKUserContentFilterRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKUserContentFilterRef.cpp        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx"> auto compiledContentExtensionData = WebCore::ContentExtensions::compileRuleList(toWTFString(serializedRulesRef));
</span><del>- auto compiledContentExtension = WebKit::WebCompiledContentExtension::create(WTF::move(compiledContentExtensionData.bytecode), WTF::move(compiledContentExtensionData.actions));
</del><ins>+ auto compiledContentExtension = WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData(compiledContentExtensionData);
</ins><span class="cx">
</span><span class="cx"> return toAPI(&API::UserContentExtension::create(toWTFString(nameRef), WTF::move(compiledContentExtension)).leakRef());
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKUserContentFiltermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentFilter.mm        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> return nil;
</span><span class="cx">
</span><span class="cx"> auto compiledContentExtensionData = WebCore::ContentExtensions::compileRuleList(String(serializedRules));
</span><del>- auto compiledContentExtension = WebKit::WebCompiledContentExtension::create(WTF::move(compiledContentExtensionData.bytecode), WTF::move(compiledContentExtensionData.actions));
</del><ins>+ auto compiledContentExtension = WebKit::WebCompiledContentExtension::createFromCompiledContentExtensionData(compiledContentExtensionData);
</ins><span class="cx">
</span><span class="cx"> API::Object::constructInWrapper<API::UserContentExtension>(self, String(name), WTF::move(compiledContentExtension));
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessUserContentWebUserContentControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/WebProcess/UserContent/WebUserContentController.cpp        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -186,7 +186,7 @@
</span><span class="cx"> {
</span><span class="cx"> for (const auto& userContentExtension : userContentExtensions) {
</span><span class="cx"> WebCompiledContentExtensionData contentExtensionData = userContentExtension.second;
</span><del>- RefPtr<WebCompiledContentExtension> compiledContentExtension = WebCompiledContentExtension::create(WTF::move(contentExtensionData.bytecode), WTF::move(contentExtensionData.actions));
</del><ins>+ RefPtr<WebCompiledContentExtension> compiledContentExtension = WebCompiledContentExtension::create(WTF::move(contentExtensionData));
</ins><span class="cx"> m_userContentController->addUserContentExtension(userContentExtension.first, compiledContentExtension);
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageGroupProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp (181245 => 181246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp        2015-03-08 17:02:16 UTC (rev 181245)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPageGroupProxy.cpp        2015-03-08 21:32:50 UTC (rev 181246)
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> #if ENABLE(CONTENT_EXTENSIONS)
</span><span class="cx"> void WebPageGroupProxy::addUserContentExtension(const String& name, WebCompiledContentExtensionData contentExtensionData)
</span><span class="cx"> {
</span><del>- RefPtr<WebCompiledContentExtension> compiledContentExtension = WebCompiledContentExtension::create(WTF::move(contentExtensionData.bytecode), WTF::move(contentExtensionData.actions));
</del><ins>+ RefPtr<WebCompiledContentExtension> compiledContentExtension = WebCompiledContentExtension::create(WTF::move(contentExtensionData));
</ins><span class="cx"> userContentController().addUserContentExtension(name, compiledContentExtension);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>