<!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>[214012] branches/safari-603.1.30.4-branch/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/214012">214012</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2017-03-15 15:43:23 -0700 (Wed, 15 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/213737">r213737</a>. rdar://problem/30983702</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6031304branchSourceWebKitwinChangeLog">branches/safari-603.1.30.4-branch/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#branchessafari6031304branchSourceWebKitwinWebKitDLLcpp">branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.cpp</a></li>
<li><a href="#branchessafari6031304branchSourceWebKitwinWebKitDLLh">branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6031304branchSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-603.1.30.4-branch/Source/WebKit/win/ChangeLog (214011 => 214012)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603.1.30.4-branch/Source/WebKit/win/ChangeLog        2017-03-15 22:29:29 UTC (rev 214011)
+++ branches/safari-603.1.30.4-branch/Source/WebKit/win/ChangeLog        2017-03-15 22:43:23 UTC (rev 214012)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2017-03-15  Matthew Hanson  &lt;matthew_hanson@apple.com&gt;
+
+        Merge r213737. rdar://problem/30983702
+
+    2017-03-10  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+            [Win] Re-export a few symbols for backwards compatibility
+            https://bugs.webkit.org/show_bug.cgi?id=169490
+            &lt;rdar://problem/30983623&gt;
+
+            Reviewed by Dean Jackson.
+
+            Re-introduce a workaround that re-exports 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: Only advertise these functions when building WebKt itself.
+
</ins><span class="cx"> 2017-02-28  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] REGRESSION(r211254): IWebPreferencesPrivate binary API broken
</span></span></pre></div>
<a id="branchessafari6031304branchSourceWebKitwinWebKitDLLcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.cpp (214011 => 214012)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.cpp        2017-03-15 22:29:29 UTC (rev 214011)
+++ branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.cpp        2017-03-15 22:43:23 UTC (rev 214012)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2014-2015 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2017 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</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"> #if USE(CG)
</span><span class="lines">@@ -65,6 +66,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">@@ -73,6 +75,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">@@ -219,3 +222,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;JavaScriptCore.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="branchessafari6031304branchSourceWebKitwinWebKitDLLh"></a>
<div class="modfile"><h4>Modified: branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.h (214011 => 214012)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.h        2017-03-15 22:29:29 UTC (rev 214011)
+++ branches/safari-603.1.30.4-branch/Source/WebKit/win/WebKitDLL.h        2017-03-15 22:43:23 UTC (rev 214012)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007 Apple Inc.  All rights reserved.
</del><ins>+ * Copyright (C) 2006-2017 Apple Inc.  All rights reserved.
</ins><span class="cx">  *
</span><span class="cx">  * Redistribution and use in source and binary forms, with or without
</span><span class="cx">  * modification, are permitted provided that the following conditions
</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*);
+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>
</div>

</body>
</html>