<!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>[196321] 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/196321">196321</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2016-02-09 10:57:05 -0800 (Tue, 09 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>All 32-bit plug-ins should use the XPC service
https://bugs.webkit.org/show_bug.cgi?id=154036
rdar://problem/16059483

Reviewed by Dan Bernstein.

Silverlight expects malloced memory from the tiny zone to be executable. It also expects
the data segment from its coreclr image to be executable.

Make this possible by:

1. Shimming mach_vm_map, making sure to add the VM_PROT_EXECUTABLE bit to any memory in the tiny zone.
2. Go through the address space, looking for any existing ranges from the tiny zone and mach_vm_protect them
   to be executable.
3. Register with dyld so we'll get callbacks whenever a library is bound, look for the coreclr image, and
   mach_vm_protect its __DATA segment to be executable.

* Platform/spi/Cocoa/DyldSPI.h: Copied from Source/WebKit2/PluginProcess/mac/PluginProcessShim.h.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::isMallocMemoryTag):
(WebKit::shouldMapMemoryExecutable):
(WebKit::initializeShim):
(WebKit::PluginProcess::platformInitializeProcess):
* PluginProcess/mac/PluginProcessShim.h:
* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shimMachVMMap):
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions):
(WebKit::shouldUseXPC): Deleted.
* WebKit2.xcodeproj/project.pbxproj:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessmacPluginProcessMacmm">trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessmacPluginProcessShimh">trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h</a></li>
<li><a href="#trunkSourceWebKit2PluginProcessmacPluginProcessShimmm">trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPluginsmacPluginProcessProxyMacmm">trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2PlatformspiCocoaDyldSPIh">trunk/Source/WebKit2/Platform/spi/Cocoa/DyldSPI.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -1,3 +1,36 @@
</span><ins>+2016-02-09  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        All 32-bit plug-ins should use the XPC service
+        https://bugs.webkit.org/show_bug.cgi?id=154036
+        rdar://problem/16059483
+
+        Reviewed by Dan Bernstein.
+        
+        Silverlight expects malloced memory from the tiny zone to be executable. It also expects
+        the data segment from its coreclr image to be executable.
+        
+        Make this possible by:
+        
+        1. Shimming mach_vm_map, making sure to add the VM_PROT_EXECUTABLE bit to any memory in the tiny zone.
+        2. Go through the address space, looking for any existing ranges from the tiny zone and mach_vm_protect them
+           to be executable.
+        3. Register with dyld so we'll get callbacks whenever a library is bound, look for the coreclr image, and
+           mach_vm_protect its __DATA segment to be executable.
+
+        * Platform/spi/Cocoa/DyldSPI.h: Copied from Source/WebKit2/PluginProcess/mac/PluginProcessShim.h.
+        * PluginProcess/mac/PluginProcessMac.mm:
+        (WebKit::isMallocMemoryTag):
+        (WebKit::shouldMapMemoryExecutable):
+        (WebKit::initializeShim):
+        (WebKit::PluginProcess::platformInitializeProcess):
+        * PluginProcess/mac/PluginProcessShim.h:
+        * PluginProcess/mac/PluginProcessShim.mm:
+        (WebKit::shimMachVMMap):
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        (WebKit::PluginProcessProxy::platformGetLaunchOptions):
+        (WebKit::shouldUseXPC): Deleted.
+        * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2016-02-09  Fujii Hironori  &lt;Hironori.Fujii@jp.sony.com&gt;
</span><span class="cx"> 
</span><span class="cx">         possible buffer overrun in Connection::processMessage of Source/WebKit2/Platform/IPC/unix/ConnectionUnix.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformspiCocoaDyldSPIhfromrev196315trunkSourceWebKit2PluginProcessmacPluginProcessShimh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Platform/spi/Cocoa/DyldSPI.h (from rev 196315, trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h) (0 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/spi/Cocoa/DyldSPI.h                                (rev 0)
+++ trunk/Source/WebKit2/Platform/spi/Cocoa/DyldSPI.h        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -0,0 +1,43 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import &lt;mach-o/dyld_priv.h&gt;
+
+#else
+
+#import &lt;mach-o/dyld_images.h&gt;
+#import &lt;stdint.h&gt;
+
+enum dyld_image_states {
+    dyld_image_state_bound = 40,
+};
+
+typedef const char* (*dyld_image_state_change_handler)(enum dyld_image_states state, uint32_t infoCount, const struct dyld_image_info info[]);
+
+extern &quot;C&quot; void dyld_register_image_state_change_handler(enum dyld_image_states state, bool batch, dyld_image_state_change_handler handler);
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessmacPluginProcessMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> 
</span><span class="cx"> #import &quot;ArgumentCoders.h&quot;
</span><ins>+#import &quot;DyldSPI.h&quot;
</ins><span class="cx"> #import &quot;NetscapePlugin.h&quot;
</span><span class="cx"> #import &quot;PluginProcessCreationParameters.h&quot;
</span><span class="cx"> #import &quot;PluginProcessProxyMessages.h&quot;
</span><span class="lines">@@ -41,6 +42,9 @@
</span><span class="cx"> #import &lt;WebCore/LocalizedStrings.h&gt;
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><span class="cx"> #import &lt;dlfcn.h&gt;
</span><ins>+#import &lt;mach-o/getsect.h&gt;
+#import &lt;mach/mach_vm.h&gt;
+#import &lt;mach/vm_statistics.h&gt;
</ins><span class="cx"> #import &lt;objc/runtime.h&gt;
</span><span class="cx"> #import &lt;sysexits.h&gt;
</span><span class="cx"> #import &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -203,6 +207,30 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static bool isMallocTinyMemoryTag(int tag)
+{
+    switch (tag) {
+    case VM_MEMORY_MALLOC_TINY:
+        return true;
+
+    default:
+        return false;
+    }
+}
+
+static bool shouldMapMallocMemoryExecutable;
+
+static bool shouldMapMemoryExecutable(int flags)
+{
+    if (!shouldMapMallocMemoryExecutable)
+        return false;
+
+    if (!isMallocTinyMemoryTag((flags &gt;&gt; 24) &amp; 0xff))
+        return false;
+
+    return true;
+}
+
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> static void setModal(bool modalWindowIsShowing)
</span><span class="lines">@@ -257,6 +285,7 @@
</span><span class="cx">         carbonWindowHidden,
</span><span class="cx">         setModal,
</span><span class="cx">         openCFURLRef,
</span><ins>+        shouldMapMemoryExecutable,
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     PluginProcessShimInitializeFunc initFunc = reinterpret_cast&lt;PluginProcessShimInitializeFunc&gt;(dlsym(RTLD_DEFAULT, &quot;WebKitPluginProcessShimInitialize&quot;));
</span><span class="lines">@@ -419,11 +448,9 @@
</span><span class="cx"> void PluginProcess::platformInitializeProcess(const ChildProcessInitializationParameters&amp; parameters)
</span><span class="cx"> {
</span><span class="cx"> #if defined(__i386__)
</span><del>-    // Initialize the shim.
</del><span class="cx">     initializeShim();
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    // Initialize Cocoa overrides.
</del><span class="cx">     initializeCocoaOverrides();
</span><span class="cx"> 
</span><span class="cx">     // FIXME: It would be better to proxy SetCursor calls over to the UI process instead of
</span><span class="lines">@@ -440,6 +467,65 @@
</span><span class="cx"> 
</span><span class="cx">     m_pluginBundleIdentifier = CFBundleGetIdentifier(pluginBundle.get());
</span><span class="cx"> 
</span><ins>+#if defined(__i386__)
+    if (m_pluginBundleIdentifier == &quot;com.microsoft.SilverlightPlugin&quot;) {
+        // Set this so that any calls to mach_vm_map for pages reserved by malloc will be executable.
+        shouldMapMallocMemoryExecutable = true;
+
+        // Go through the address space looking for already existing malloc regions and change the
+        // protection to make them executable.
+        mach_vm_size_t size;
+        uint32_t depth = 0;
+        struct vm_region_submap_info_64 info = { };
+        mach_msg_type_number_t count = VM_REGION_SUBMAP_INFO_COUNT_64;
+        for (mach_vm_address_t addr = 0; ; addr += size) {
+            kern_return_t kr = mach_vm_region_recurse(mach_task_self(), &amp;addr, &amp;size, &amp;depth, (vm_region_recurse_info_64_t)&amp;info, &amp;count);
+            if (kr != KERN_SUCCESS)
+                break;
+
+            if (isMallocTinyMemoryTag(info.user_tag))
+                mach_vm_protect(mach_task_self(), addr, size, false, info.protection | VM_PROT_EXECUTE);
+        }
+
+        // Silverlight expects the data segment of its coreclr library to be executable.
+        // Register with dyld to get notified when libraries are bound, then look for the
+        // coreclr image and make its __DATA segment executable.
+        dyld_register_image_state_change_handler(dyld_image_state_bound, false, [](enum dyld_image_states state, uint32_t infoCount, const struct dyld_image_info info[]) -&gt; const char* {
+            for (uint32_t i = 0; i &lt; infoCount; ++i) {
+                const char* pathSuffix = &quot;/Silverlight.plugin/Contents/MacOS/CoreCLR.bundle/Contents/MacOS/coreclr&quot;;
+
+                int pathSuffixLength = strlen(pathSuffix);
+                int imageFilePathLength = strlen(info[i].imageFilePath);
+
+                if (imageFilePathLength &lt; pathSuffixLength)
+                    continue;
+
+                if (strcmp(info[i].imageFilePath + (imageFilePathLength - pathSuffixLength), pathSuffix))
+                    continue;
+
+                unsigned long segmentSize;
+                const uint8_t* segmentData = getsegmentdata(info[i].imageLoadAddress, &quot;__DATA&quot;, &amp;segmentSize);
+                if (!segmentData)
+                    break;
+
+                mach_vm_size_t size;
+                uint32_t depth = 0;
+                struct vm_region_submap_info_64 info = { };
+                mach_msg_type_number_t count = VM_REGION_SUBMAP_INFO_COUNT_64;
+                for (mach_vm_address_t addr = reinterpret_cast&lt;mach_vm_address_t&gt;(segmentData); addr &lt; reinterpret_cast&lt;mach_vm_address_t&gt;(segmentData) + segmentSize ; addr += size) {
+                    kern_return_t kr = mach_vm_region_recurse(mach_task_self(), &amp;addr, &amp;size, &amp;depth, (vm_region_recurse_info_64_t)&amp;info, &amp;count);
+                    if (kr != KERN_SUCCESS)
+                        break;
+
+                    mach_vm_protect(mach_task_self(), addr, size, false, info.protection | VM_PROT_EXECUTE);
+                }
+            }
+
+            return nullptr;
+        });
+    }
+#endif
+
</ins><span class="cx">     // FIXME: Workaround for Java not liking its plugin process to be suppressed - &lt;rdar://problem/14267843&gt;
</span><span class="cx">     if (m_pluginBundleIdentifier == &quot;com.oracle.java.JavaAppletPlugin&quot;)
</span><span class="cx">         (new UserActivity(&quot;com.oracle.java.JavaAppletPlugin&quot;))-&gt;start();
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessmacPluginProcessShimh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx">     void (*carbonWindowHidden)(WindowRef);
</span><span class="cx">     void (*setModal)(bool);
</span><span class="cx">     bool (*openCFURLRef)(CFURLRef, int32_t&amp; returnValue, CFURLRef* launchedURL);
</span><ins>+    bool (*shouldMapMemoryExecutable)(int flags);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> typedef void (*PluginProcessShimInitializeFunc)(const PluginProcessShimCallbacks&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2PluginProcessmacPluginProcessShimmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import &lt;Carbon/Carbon.h&gt;
</span><span class="cx"> #import &lt;WebCore/DynamicLinkerInterposing.h&gt;
</span><span class="cx"> #import &lt;WebKitSystemInterface.h&gt;
</span><ins>+#import &lt;mach/mach_vm.h&gt;
</ins><span class="cx"> #import &lt;objc/message.h&gt;
</span><span class="cx"> #import &lt;stdio.h&gt;
</span><span class="cx"> #import &lt;sys/ipc.h&gt;
</span><span class="lines">@@ -110,6 +111,18 @@
</span><span class="cx">     return LSOpenCFURLRef(url, launchedURL);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static kern_return_t shimMachVMMap(vm_map_t task, mach_vm_address_t *address, mach_vm_size_t size, mach_vm_offset_t mask, int flags, mem_entry_name_port_t object, memory_object_offset_t offset, boolean_t copy, vm_prot_t currentProtection, vm_prot_t maxProtection, vm_inherit_t inheritance)
+{
+    if (task == mach_task_self()) {
+        if (pluginProcessShimCallbacks.shouldMapMemoryExecutable &amp;&amp; pluginProcessShimCallbacks.shouldMapMemoryExecutable(flags)) {
+            currentProtection |= VM_PROT_EXECUTE;
+            maxProtection |= VM_PROT_EXECUTE;
+        }
+    }
+
+    return mach_vm_map(task, address, size, mask, flags, object, offset, copy, currentProtection, maxProtection, inheritance);
+}
+
</ins><span class="cx"> DYLD_INTERPOSE(shimDebugger, Debugger);
</span><span class="cx"> DYLD_INTERPOSE(shimGetCurrentEventButtonState, GetCurrentEventButtonState);
</span><span class="cx"> DYLD_INTERPOSE(shimIsWindowActive, IsWindowActive);
</span><span class="lines">@@ -118,6 +131,7 @@
</span><span class="cx"> DYLD_INTERPOSE(shimShowWindow, ShowWindow);
</span><span class="cx"> DYLD_INTERPOSE(shimHideWindow, HideWindow);
</span><span class="cx"> DYLD_INTERPOSE(shimLSOpenCFURLRef, LSOpenCFURLRef);
</span><ins>+DYLD_INTERPOSE(shimMachVMMap, mach_vm_map);
</ins><span class="cx"> 
</span><span class="cx"> #pragma clang diagnostic pop
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPluginsmacPluginProcessProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -129,22 +129,6 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-static bool shouldUseXPC(ProcessLauncher::LaunchOptions&amp; launchOptions, const PluginProcessAttributes&amp; pluginProcessAttributes)
-{
-    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@&quot;WebKitUseXPCServiceForPlugIns&quot;])
-        return [value boolValue];
-
-    // FIXME: This can be removed when &lt;rdar://problem/16856490&gt; is resolved.
-    if (pluginProcessAttributes.moduleInfo.bundleIdentifier == &quot;com.adobe.acrobat.pdfviewerNPAPI&quot;)
-        return false;
-
-    // FIXME: We should still use XPC for plug-ins that want the heap to be executable, see &lt;rdar://problem/16059483&gt;.
-    if (launchOptions.executableHeap)
-        return false;
-
-    return true;
-}
-
</del><span class="cx"> void PluginProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions&amp; launchOptions, const PluginProcessAttributes&amp; pluginProcessAttributes)
</span><span class="cx"> {
</span><span class="cx">     launchOptions.architecture = pluginProcessAttributes.moduleInfo.pluginArchitecture;
</span><span class="lines">@@ -158,7 +142,7 @@
</span><span class="cx">             WTFLogAlways(&quot;Main process is sandboxed, ignoring plug-in sandbox policy&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    launchOptions.useXPC = shouldUseXPC(launchOptions, pluginProcessAttributes);
</del><ins>+    launchOptions.useXPC = true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters&amp; parameters)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (196320 => 196321)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-02-09 18:33:35 UTC (rev 196320)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2016-02-09 18:57:05 UTC (rev 196321)
</span><span class="lines">@@ -205,6 +205,7 @@
</span><span class="cx">                 1A2D92211281DC1B001EB962 /* PluginProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D92201281DC1B001EB962 /* PluginProxyMac.mm */; };
</span><span class="cx">                 1A2D956F12848564001EB962 /* ChildProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D956D12848564001EB962 /* ChildProcess.h */; };
</span><span class="cx">                 1A2D957012848564001EB962 /* ChildProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D956E12848564001EB962 /* ChildProcess.cpp */; };
</span><ins>+                1A2E17EF1C6A590C00D04CF6 /* DyldSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2E17EE1C6A590C00D04CF6 /* DyldSPI.h */; };
</ins><span class="cx">                 1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */; };
</span><span class="cx">                 1A30EAC6115D7DA30053E937 /* ConnectionMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A30EAC5115D7DA30053E937 /* ConnectionMac.mm */; };
</span><span class="cx">                 1A334DED16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */; };
</span><span class="lines">@@ -2226,6 +2227,7 @@
</span><span class="cx">                 1A2D92201281DC1B001EB962 /* PluginProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProxyMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2D956D12848564001EB962 /* ChildProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcess.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A2D956E12848564001EB962 /* ChildProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcess.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A2E17EE1C6A590C00D04CF6 /* DyldSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DyldSPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResponsivenessTimer.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A30EAC5115D7DA30053E937 /* ConnectionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConnectionMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A334DEA16DE8B68006A8E38 /* StorageAreaMap.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageAreaMap.messages.in; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5121,6 +5123,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1A5705101BE410E500874AF1 /* BlockSPI.h */,
</span><ins>+                                1A2E17EE1C6A590C00D04CF6 /* DyldSPI.h */,
</ins><span class="cx">                                 3754D5441B3A29FD003A4C7F /* NSInvocationSPI.h */,
</span><span class="cx">                         );
</span><span class="cx">                         path = Cocoa;
</span><span class="lines">@@ -7945,6 +7948,7 @@
</span><span class="cx">                                 51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */,
</span><span class="cx">                                 7C361D731927FA360036A59D /* WebScriptMessageHandler.h in Headers */,
</span><span class="cx">                                 D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */,
</span><ins>+                                1A2E17EF1C6A590C00D04CF6 /* DyldSPI.h in Headers */,
</ins><span class="cx">                                 1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */,
</span><span class="cx">                                 1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
</span><span class="cx">                                 1A53C2AA1A325730004E8C70 /* WebsiteDataStore.h in Headers */,
</span></span></pre>
</div>
</div>

</body>
</html>