<!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>[189605] tags/Safari-601.1.56.0.1/Source/WebKit/win</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/189605">189605</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-09-10 22:54:20 -0700 (Thu, 10 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge patch for rdar://problem/22633105.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari60115601SourceWebKitwinChangeLog">tags/Safari-601.1.56.0.1/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#tagsSafari60115601SourceWebKitwinWebKitDLLcpp">tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.cpp</a></li>
<li><a href="#tagsSafari60115601SourceWebKitwinWebKitDLLh">tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.h</a></li>
<li><a href="#tagsSafari60115601SourceWebKitwinWebViewcpp">tags/Safari-601.1.56.0.1/Source/WebKit/win/WebView.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari60115601SourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.56.0.1/Source/WebKit/win/ChangeLog (189604 => 189605)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.56.0.1/Source/WebKit/win/ChangeLog        2015-09-11 05:51:36 UTC (rev 189604)
+++ tags/Safari-601.1.56.0.1/Source/WebKit/win/ChangeLog        2015-09-11 05:54:20 UTC (rev 189605)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2015-09-10  Babak Shafiei  &lt;bshafiei@apple.com&gt;
+
+        Merge patch for rdar://problem/22633105.
+
+    2015-09-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+            [Win] Re-export a few symbols for backwards compatibility
+            &lt;rdar://problem/22633105&gt;
+
+            Reviewed by Dean Jackson.
+
+            Check in a workaround (in a custom branch) to re-export a few JavaScriptCore
+            functions that had been erroneously exported by WebKit in older builds. This
+            is needed so that we do not break certain old software still being used.
+
+            * WebKitDLL.cpp:
+            (DllMain): Bind functions at startup.
+            (bindJavaScriptTrampoline): Find JavaScriptCore library functions and
+            re-export them from WebKit.dll.
+            * WebKitDLL.h:
+            * WebView.cpp:
+            (WebView::unused5): Work around a linker bug.
+
</ins><span class="cx"> 2015-08-14  Babak Shafiei  &lt;bshafiei@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r188486.
</span></span></pre></div>
<a id="tagsSafari60115601SourceWebKitwinWebKitDLLcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.cpp (189604 => 189605)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.cpp        2015-09-11 05:51:36 UTC (rev 189604)
+++ tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.cpp        2015-09-11 05:54:20 UTC (rev 189605)
</span><span class="lines">@@ -23,6 +23,7 @@
</span><span class="cx">  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
</span><span class="cx">  */
</span><span class="cx"> 
</span><ins>+#define DEPRECATED_EXPORT_SYMBOLS 1
</ins><span class="cx"> #include &quot;WebKitDLL.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;ForEachCoClass.h&quot;
</span><span class="lines">@@ -61,6 +62,7 @@
</span><span class="cx">     return gClassNameCount.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void bindJavaScriptTrampoline();
</ins><span class="cx"> 
</span><span class="cx"> STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID /*lpReserved*/)
</span><span class="cx"> {
</span><span class="lines">@@ -77,6 +79,7 @@
</span><span class="cx">             gLockCount = gClassCount = 0;
</span><span class="cx">             gInstance = hModule;
</span><span class="cx">             WebCore::setInstanceHandle(hModule);
</span><ins>+            bindJavaScriptTrampoline();
</ins><span class="cx">             return TRUE;
</span><span class="cx"> 
</span><span class="cx">         case DLL_PROCESS_DETACH:
</span><span class="lines">@@ -221,3 +224,171 @@
</span><span class="cx"> 
</span><span class="cx">     return WebCore::SharedBuffer::create(reinterpret_cast&lt;const char*&gt;(resource), size);
</span><span class="cx"> }
</span><ins>+
+// Force symbols to be included so we can export them for legacy clients.
+// DEPRECATED! People should get these symbols from JavaScriptCore.dll, not WebKit.dll!
+//#include &lt;JavaScriptCore/JSObjectRef.h&gt;
+
+typedef JSClassRef (*JSClassCreateFunction)(const JSClassDefinition* definition);
+typedef void* (*JSObjectGetPrivateFunction)(JSObjectRef);
+typedef JSObjectRef (*JSObjectMakeFunctionStub)(JSContextRef, JSClassRef, void*);
+typedef void (*JSObjectSetPropertyFunction)(JSContextRef, JSObjectRef, JSStringRef propertyName, JSValueRef, JSPropertyAttributes, JSValueRef* exception);
+typedef JSStringRef (*JSStringCreateWithCFStringFunction)(CFStringRef);
+typedef JSStringRef (*JSStringCreateWithUTF8CStringFunction)(const char*);
+typedef const JSChar* (*JSStringGetCharactersPtrFunction)(JSStringRef);
+typedef size_t (*JSStringGetLengthFunction)(JSStringRef);
+typedef void (*JSStringReleaseFunction)(JSStringRef);
+typedef bool (*JSValueIsTypeFunction)(JSContextRef, JSValueRef);
+typedef JSValueRef(*JSValueMakeUndefinedFunction)(JSContextRef);
+typedef double(*JSValueToNumberFunction)(JSContextRef, JSValueRef, JSValueRef* exception);
+typedef JSValueRef(*JSValueMakeStringFunction)(JSContextRef, JSStringRef);
+typedef JSStringRef (*JSValueToStringCopyFunction)(JSContextRef, JSValueRef, JSValueRef* exception);
+
+JSClassCreateFunction m_jsClassCreateFunction = nullptr;
+JSObjectGetPrivateFunction m_jsObjectGetPrivateFunction = nullptr;
+JSObjectMakeFunctionStub m_jsObjectMakeFunction = nullptr;
+JSObjectSetPropertyFunction m_jsObjectSetPropertyFunction = nullptr;
+JSStringCreateWithCFStringFunction m_jsStringCreateWithCFStringFunction = nullptr;
+JSStringCreateWithUTF8CStringFunction m_jsStringCreateWithUTF8CStringFunction = nullptr;
+JSStringGetCharactersPtrFunction m_jsStringGetCharactersPtrFunction = nullptr;
+JSStringGetLengthFunction m_jsStringGetLengthFunction = nullptr;
+JSStringReleaseFunction m_jsStringReleaseFunction = nullptr;
+JSValueIsTypeFunction m_jsValueIsNumberFunction = nullptr;
+JSValueIsTypeFunction m_jsValueIsStringFunction = nullptr;
+JSValueMakeUndefinedFunction m_jsValueMakeUndefinedFunction = nullptr;
+JSValueToNumberFunction m_jsValueToNumberFunction = nullptr;
+JSValueMakeStringFunction m_jsValueMakeStringFunction = nullptr;
+JSValueToStringCopyFunction m_jsValueToStringCopyFunction = nullptr;
+
+void bindJavaScriptTrampoline()
+{
+    const wchar_t* libraryName = L&quot;libllvmForJSC.dll&quot;;
+
+    HMODULE library = ::LoadLibrary(libraryName);
+    if (!library)
+        return;
+
+    m_jsClassCreateFunction = reinterpret_cast&lt;JSClassCreateFunction&gt;(::GetProcAddress(library, &quot;JSClassCreate&quot;));
+    m_jsObjectGetPrivateFunction = reinterpret_cast&lt;JSObjectGetPrivateFunction&gt;(::GetProcAddress(library, &quot;JSObjectGetPrivate&quot;));
+    m_jsObjectMakeFunction = reinterpret_cast&lt;JSObjectMakeFunctionStub&gt;(::GetProcAddress(library, &quot;JSObjectMake&quot;));
+    m_jsObjectSetPropertyFunction = reinterpret_cast&lt;JSObjectSetPropertyFunction&gt;(::GetProcAddress(library, &quot;JSObjectSetProperty&quot;));;
+    m_jsStringCreateWithCFStringFunction = reinterpret_cast&lt;JSStringCreateWithCFStringFunction&gt;(::GetProcAddress(library, &quot;JSStringCreateWithCFString&quot;));
+    m_jsStringCreateWithUTF8CStringFunction = reinterpret_cast&lt;JSStringCreateWithUTF8CStringFunction&gt;(::GetProcAddress(library, &quot;JSStringCreateWithUTF8CString&quot;));
+    m_jsStringGetCharactersPtrFunction = reinterpret_cast&lt;JSStringGetCharactersPtrFunction&gt;(::GetProcAddress(library, &quot;JSStringGetCharactersPtr&quot;));
+    m_jsStringGetLengthFunction = reinterpret_cast&lt;JSStringGetLengthFunction&gt;(::GetProcAddress(library, &quot;JSStringGetLength&quot;));
+    m_jsStringReleaseFunction = reinterpret_cast&lt;JSStringReleaseFunction&gt;(::GetProcAddress(library, &quot;JSStringRelease&quot;));
+    m_jsValueIsNumberFunction = reinterpret_cast&lt;JSValueIsTypeFunction&gt;(::GetProcAddress(library, &quot;JSValueIsNumber&quot;));
+    m_jsValueIsStringFunction = reinterpret_cast&lt;JSValueIsTypeFunction&gt;(::GetProcAddress(library, &quot;JSValueIsString&quot;));
+    m_jsValueMakeStringFunction = reinterpret_cast&lt;JSValueMakeStringFunction&gt;(::GetProcAddress(library, &quot;JSValueMakeString&quot;));
+    m_jsValueMakeUndefinedFunction = reinterpret_cast&lt;JSValueMakeUndefinedFunction&gt;(::GetProcAddress(library, &quot;JSValueMakeUndefined&quot;));
+    m_jsValueToNumberFunction = reinterpret_cast&lt;JSValueToNumberFunction&gt;(::GetProcAddress(library, &quot;JSValueToNumber&quot;));
+    m_jsValueToStringCopyFunction = reinterpret_cast&lt;JSValueToStringCopyFunction&gt;(::GetProcAddress(library, &quot;JSValueToStringCopy&quot;));
+}
+
+extern &quot;C&quot;
+{
+
+JSClassRef JSClassCreate(const JSClassDefinition* definition)
+{
+    if (m_jsClassCreateFunction)
+        return m_jsClassCreateFunction(definition);
+    return nullptr;
+}
+
+void* JSObjectGetPrivate(JSObjectRef object)
+{
+    if (m_jsObjectGetPrivateFunction)
+        return m_jsObjectGetPrivateFunction(object);
+    return nullptr;
+}
+
+JSObjectRef JSObjectMake(JSContextRef ctx, JSClassRef classRef, void* data)
+{
+    if (m_jsObjectMakeFunction)
+        return m_jsObjectMakeFunction(ctx, classRef, data);
+    return nullptr;
+}
+
+void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef* exception)
+{
+    if (m_jsObjectSetPropertyFunction)
+        m_jsObjectSetPropertyFunction(ctx, object, propertyName, value, attributes, exception);
+}
+
+JSStringRef JSStringCreateWithCFString(CFStringRef value)
+{
+    if (m_jsStringCreateWithCFStringFunction)
+        return m_jsStringCreateWithCFStringFunction(value);
+    return nullptr;
+}
+
+JSStringRef JSStringCreateWithUTF8CString(const char* value)
+{
+    if (m_jsStringCreateWithUTF8CStringFunction)
+        return m_jsStringCreateWithUTF8CStringFunction(value);
+    return nullptr;
+}
+
+const JSChar* JSStringGetCharactersPtr(JSStringRef value)
+{
+    if (m_jsStringGetCharactersPtrFunction)
+        return m_jsStringGetCharactersPtrFunction(value);
+    return nullptr;
+}
+
+size_t JSStringGetLength(JSStringRef value)
+{
+    if (m_jsStringGetLengthFunction)
+        return m_jsStringGetLengthFunction(value);
+    return 0;
+}
+
+void JSStringRelease(JSStringRef value)
+{
+    if (m_jsStringReleaseFunction)
+        return m_jsStringReleaseFunction(value);
+}
+
+bool JSValueIsNumber(JSContextRef ctx, JSValueRef value)
+{
+    if (m_jsValueIsNumberFunction)
+        return m_jsValueIsNumberFunction(ctx, value);
+    return false;
+}
+
+bool JSValueIsString(JSContextRef ctx, JSValueRef value)
+{
+    if (m_jsValueIsStringFunction)
+        return m_jsValueIsStringFunction(ctx, value);
+    return false;
+}
+
+JSValueRef JSValueMakeString(JSContextRef ctx, JSStringRef value)
+{
+    if (m_jsValueMakeStringFunction)
+        return m_jsValueMakeStringFunction(ctx, value);
+    return nullptr;
+}
+
+JSValueRef JSValueMakeUndefined(JSContextRef ctx)
+{
+    if (m_jsValueMakeUndefinedFunction)
+        return m_jsValueMakeUndefinedFunction(ctx);
+    return nullptr;
+}
+
+double JSValueToNumber(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
+{
+    if (m_jsValueToNumberFunction)
+        return m_jsValueToNumberFunction(ctx, value, exception);
+    return 0;
+}
+
+JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef* exception)
+{
+    if (m_jsValueToStringCopyFunction)
+        return m_jsValueToStringCopyFunction(ctx, value, exception);
+    return nullptr;
+}
+
+}
</ins></span></pre></div>
<a id="tagsSafari60115601SourceWebKitwinWebKitDLLh"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.h (189604 => 189605)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.h        2015-09-11 05:51:36 UTC (rev 189604)
+++ tags/Safari-601.1.56.0.1/Source/WebKit/win/WebKitDLL.h        2015-09-11 05:54:20 UTC (rev 189605)
</span><span class="lines">@@ -56,6 +56,37 @@
</span><span class="cx"> 
</span><span class="cx"> WEBKIT_API void shutDownWebKit();
</span><span class="cx"> 
</span><ins>+#if defined(DEPRECATED_EXPORT_SYMBOLS)
+
+#include &lt;JavaScriptCore/JSObjectRef.h&gt;
+
+// Force symbols to be included so we can export them for legacy clients.
+// DEPRECATED! People should get these symbols from JavaScriptCore.dll, not WebKit.dll!
+typedef struct OpaqueJSClass* JSClassRef;
+typedef const struct OpaqueJSContext* JSContextRef;
+typedef const struct OpaqueJSValue* JSValueRef;
+typedef struct OpaqueJSString* JSStringRef;
+typedef wchar_t JSChar;
+typedef unsigned JSPropertyAttributes;
+
+WEBKIT_API JSClassRef JSClassCreate(const JSClassDefinition* definition);
+WEBKIT_API void* JSObjectGetPrivate(JSObjectRef);
+WEBKIT_API JSObjectRef JSObjectMake(JSContextRef, JSClassRef, void*);
+WEBKIT_API void JSObjectSetProperty(JSContextRef, JSObjectRef, JSStringRef propertyName, JSValueRef, JSPropertyAttributes, JSValueRef* exception);
+WEBKIT_API JSStringRef JSStringCreateWithCFString(CFStringRef);
+WEBKIT_API JSStringRef JSStringCreateWithUTF8CString(const char*);
+WEBKIT_API const JSChar* JSStringGetCharactersPtr(JSStringRef);
+WEBKIT_API size_t JSStringGetLength(JSStringRef);
+WEBKIT_API void JSStringRelease(JSStringRef);
+WEBKIT_API bool JSValueIsNumber(JSContextRef, JSValueRef);
+WEBKIT_API bool JSValueIsString(JSContextRef, JSValueRef);
+WEBKIT_API JSValueRef JSValueMakeString(JSContextRef, JSStringRef);
+WEBKIT_API JSValueRef JSValueMakeUndefined(JSContextRef ctx);
+WEBKIT_API double JSValueToNumber(JSContextRef, JSValueRef, JSValueRef*);
+WEBKIT_API JSStringRef JSValueToStringCopy(JSContextRef, JSValueRef, JSValueRef* exception);
+// End
+#endif
+
</ins><span class="cx"> #ifdef __cplusplus
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="tagsSafari60115601SourceWebKitwinWebViewcpp"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.56.0.1/Source/WebKit/win/WebView.cpp (189604 => 189605)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.56.0.1/Source/WebKit/win/WebView.cpp        2015-09-11 05:51:36 UTC (rev 189604)
+++ tags/Safari-601.1.56.0.1/Source/WebKit/win/WebView.cpp        2015-09-11 05:54:20 UTC (rev 189605)
</span><span class="lines">@@ -130,6 +130,7 @@
</span><span class="cx"> #include &lt;WebCore/PageCache.h&gt;
</span><span class="cx"> #include &lt;WebCore/PageConfiguration.h&gt;
</span><span class="cx"> #include &lt;WebCore/PageGroup.h&gt;
</span><ins>+#include &lt;WebCore/PathUtilities.h&gt;
</ins><span class="cx"> #include &lt;WebCore/PlatformKeyboardEvent.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformMouseEvent.h&gt;
</span><span class="cx"> #include &lt;WebCore/PlatformWheelEvent.h&gt;
</span><span class="lines">@@ -6686,6 +6687,11 @@
</span><span class="cx"> HRESULT WebView::unused5()
</span><span class="cx"> {
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><ins>+
+    // The following line works around a linker issue in MSVC. unused5 should never be called,
+    // and this code does nothing more than force the symbol to be included in WebKit dll.
+    (void)WebCore::PathUtilities::pathWithShrinkWrappedRects(Vector&lt;FloatRect&gt;(), 0);
+
</ins><span class="cx">     return E_FAIL;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>