<!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>[201912] trunk/Source/JavaScriptCore</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/201912">201912</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2016-06-09 22:53:57 -0700 (Thu, 09 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Clean up JavaScriptCore.vcxproj directory after switching to CMake.

* JavaScriptCore.vcxproj/LLInt: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: Removed.
* JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Removed.
* JavaScriptCore.vcxproj/jsc: Removed.
* JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp: Removed.
* JavaScriptCore.vcxproj/jsc/DLLLauncherWinCairo.props: Removed.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Removed.
* JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/jsc/jscCommon.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscDebug.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/jsc/jscProduction.props: Removed.
* JavaScriptCore.vcxproj/jsc/jscRelease.props: Removed.
* JavaScriptCore.vcxproj/testRegExp: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: Removed.
* JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: Removed.
* JavaScriptCore.vcxproj/testapi: Removed.
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Removed.
* JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/testapi/testapiCommon.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiDebug.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiLauncherPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: Removed.
* JavaScriptCore.vcxproj/testapi/testapiProduction.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiRelease.props: Removed.
* JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Removed.
* shell/DLLLauncherMain.cpp: Copied from JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp.
* shell/PlatformWin.cmake:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreshellPlatformWincmake">trunk/Source/JavaScriptCore/shell/PlatformWin.cmake</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreshellDLLLauncherMaincpp">trunk/Source/JavaScriptCore/shell/DLLLauncherMain.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li>trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/LLInt/</li>
<li>trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/</li>
<li>trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/testRegExp/</li>
<li>trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/testapi/</li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (201911 => 201912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-06-10 05:42:28 UTC (rev 201911)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-06-10 05:53:57 UTC (rev 201912)
</span><span class="lines">@@ -1,3 +1,72 @@
</span><ins>+2016-06-09  Alex Christensen  &lt;achristensen@webkit.org&gt;
+
+        Clean up JavaScriptCore.vcxproj directory after switching to CMake.
+
+        * JavaScriptCore.vcxproj/LLInt: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.make: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/LLIntAssembly.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntAssembly/build-LLIntAssembly.pl: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.make: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/LLIntDesiredOffsets.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntDesiredOffsets/build-LLIntDesiredOffsets.pl: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractor.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorCommon.props: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorDebug.props: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorProduction.props: Removed.
+        * JavaScriptCore.vcxproj/LLInt/LLIntOffsetsExtractor/LLIntOffsetsExtractorRelease.props: Removed.
+        * JavaScriptCore.vcxproj/jsc: Removed.
+        * JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp: Removed.
+        * JavaScriptCore.vcxproj/jsc/DLLLauncherWinCairo.props: Removed.
+        * JavaScriptCore.vcxproj/jsc/jsc.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/jsc/jsc.vcxproj.filters: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscCommon.props: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscDebug.props: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscLauncher.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscLauncherPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscLauncherPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscLauncherPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscProduction.props: Removed.
+        * JavaScriptCore.vcxproj/jsc/jscRelease.props: Removed.
+        * JavaScriptCore.vcxproj/testRegExp: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExp.vcxproj.filters: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpCommon.props: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpDebug.props: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpLauncher.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpLauncherPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpProduction.props: Removed.
+        * JavaScriptCore.vcxproj/testRegExp/testRegExpRelease.props: Removed.
+        * JavaScriptCore.vcxproj/testapi: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapi.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapi.vcxproj.filters: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiCommon.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiCommonCFLite.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiDebug.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiDebugCFLite.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiLauncher.vcxproj: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiLauncherPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiLauncherPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiLauncherPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiPostBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiPreBuild.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiPreLink.cmd: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiProduction.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiRelease.props: Removed.
+        * JavaScriptCore.vcxproj/testapi/testapiReleaseCFLite.props: Removed.
+        * shell/DLLLauncherMain.cpp: Copied from JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp.
+        * shell/PlatformWin.cmake:
+
</ins><span class="cx"> 2016-06-09  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rare failure in stress/v8-deltablue-strict.js.ftl-eager
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreshellDLLLauncherMaincppfromrev201902trunkSourceJavaScriptCoreJavaScriptCorevcxprojjscDLLLauncherMaincpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/JavaScriptCore/shell/DLLLauncherMain.cpp (from rev 201902, trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp) (0 => 201912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/shell/DLLLauncherMain.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/shell/DLLLauncherMain.cpp        2016-06-10 05:53:57 UTC (rev 201912)
</span><span class="lines">@@ -0,0 +1,222 @@
</span><ins>+/*
+ * Copyright (C) 2012-2015 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.
+ */
+
+// This file contains code for a launcher executable for WebKit apps. When compiled into foo.exe, it
+// will set PATH so that Apple Application Support DLLs can be found, then will load foo.dll and
+// call its dllLauncherEntryPoint function, which should be declared like so:
+//     extern &quot;C&quot; __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstCmdLine, int nCmdShow);
+// If USE_CONSOLE_ENTRY_POINT is defined, this function will be called instead:
+//     extern &quot;C&quot; __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, const char* argv[]);
+
+#include &lt;shlwapi.h&gt;
+#include &lt;string&gt;
+#include &lt;vector&gt;
+#include &lt;windows.h&gt;
+
+using namespace std;
+
+#if defined _M_IX86
+#define PROCESSORARCHITECTURE &quot;x86&quot;
+#elif defined _M_IA64
+#define PROCESSORARCHITECTURE &quot;ia64&quot;
+#elif defined _M_X64
+#define PROCESSORARCHITECTURE &quot;amd64&quot;
+#else
+#define PROCESSORARCHITECTURE &quot;*&quot;
+#endif
+
+#pragma comment(linker, &quot;/manifestdependency:\&quot;type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='&quot; PROCESSORARCHITECTURE &quot;' publicKeyToken='6595b64144ccf1df' language='*'\&quot;&quot;)
+#if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1600) &amp;&amp; !defined(WIN_CAIRO)
+#pragma comment(linker, &quot;/manifestdependency:\&quot;type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195' processorArchitecture='&quot; PROCESSORARCHITECTURE &quot;' publicKeyToken='1fc8b3b9a1e18e3b' language='*'\&quot;&quot;)
+#endif
+
+static void enableTerminationOnHeapCorruption()
+{
+    HEAP_INFORMATION_CLASS heapEnableTerminationOnCorruption = static_cast&lt;HEAP_INFORMATION_CLASS&gt;(1);
+    HeapSetInformation(0, heapEnableTerminationOnCorruption, 0, 0);
+}
+
+static wstring getStringValue(HKEY key, const wstring&amp; valueName)
+{
+    DWORD type = 0;
+    DWORD bufferSize = 0;
+    if (::RegQueryValueExW(key, valueName.c_str(), 0, &amp;type, 0, &amp;bufferSize) != ERROR_SUCCESS || type != REG_SZ)
+        return wstring();
+
+    vector&lt;wchar_t&gt; buffer(bufferSize / sizeof(wchar_t));
+    if (::RegQueryValueExW(key, valueName.c_str(), 0, &amp;type, reinterpret_cast&lt;LPBYTE&gt;(&amp;buffer[0]), &amp;bufferSize) != ERROR_SUCCESS)
+        return wstring();
+
+    return &amp;buffer[0];
+}
+
+static wstring applePathFromRegistry(const wstring&amp; key, const wstring&amp; value)
+{
+    HKEY applePathKey = 0;
+    if (::RegOpenKeyExW(HKEY_LOCAL_MACHINE, key.c_str(), 0, KEY_READ, &amp;applePathKey) != ERROR_SUCCESS)
+        return wstring();
+    wstring path = getStringValue(applePathKey, value);
+    ::RegCloseKey(applePathKey);
+    return path;
+}
+
+static wstring appleApplicationSupportDirectory()
+{
+    return applePathFromRegistry(L&quot;SOFTWARE\\Apple Inc.\\Apple Application Support&quot;, L&quot;InstallDir&quot;);
+}
+
+static wstring copyEnvironmentVariable(const wstring&amp; variable)
+{
+    DWORD length = ::GetEnvironmentVariableW(variable.c_str(), 0, 0);
+    if (!length)
+        return wstring();
+    vector&lt;wchar_t&gt; buffer(length);
+    if (!GetEnvironmentVariable(variable.c_str(), &amp;buffer[0], buffer.size()) || !buffer[0])
+        return wstring();
+    return &amp;buffer[0];
+}
+
+static bool prependPath(const wstring&amp; directoryToPrepend)
+{
+    wstring pathVariable = L&quot;PATH&quot;;
+    wstring oldPath = copyEnvironmentVariable(pathVariable);
+    wstring newPath = directoryToPrepend + L';' + oldPath;
+    return ::SetEnvironmentVariableW(pathVariable.c_str(), newPath.c_str());
+}
+
+static int fatalError(const wstring&amp; programName, const wstring&amp; message)
+{
+    wstring caption = programName + L&quot; can't open.&quot;;
+    ::MessageBoxW(0, message.c_str(), caption.c_str(), MB_ICONERROR);
+    return 1;
+}
+
+static bool directoryExists(const wstring&amp; path)
+{
+    DWORD attrib = ::GetFileAttributes(path.c_str());
+
+    return ((attrib != INVALID_FILE_ATTRIBUTES) &amp;&amp; (attrib &amp; FILE_ATTRIBUTE_DIRECTORY));
+}
+
+static bool modifyPath(const wstring&amp; programName)
+{
+#ifdef WIN_CAIRO
+
+#if defined(_M_X64)
+    wstring pathWinCairo = copyEnvironmentVariable(L&quot;WEBKIT_LIBRARIES&quot;) + L&quot;\\bin64&quot;;
+#else
+    wstring pathWinCairo = copyEnvironmentVariable(L&quot;WEBKIT_LIBRARIES&quot;) + L&quot;\\bin32&quot;;
+#endif
+    prependPath(pathWinCairo);
+    return true;
+
+#else
+
+    const wstring&amp; pathPrefix = appleApplicationSupportDirectory();
+
+    if (!directoryExists(pathPrefix)) {
+        fatalError(programName, L&quot;Failed to determine path to AAS directory.&quot;);
+        return false;
+    }
+
+    if (prependPath(pathPrefix))
+        return true;
+
+    fatalError(programName, L&quot;Failed to modify PATH environment variable.&quot;);
+    return false;
+#endif
+}
+
+static wstring getLastErrorString(HRESULT hr)
+{
+    static const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
+    static const size_t bufSize = 4096;
+
+    wchar_t errorMessage[bufSize];
+    DWORD len = ::FormatMessageW(kFlags, 0, hr, 0, errorMessage, bufSize, 0);
+    if (len &gt;= bufSize)
+        len = bufSize - 1;
+
+    errorMessage[len] = 0;
+
+    return errorMessage;
+}
+
+#if USE_CONSOLE_ENTRY_POINT
+int main(int argc, const char* argv[])
+#else
+int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpstrCmdLine, int nCmdShow)
+#endif
+{
+    enableTerminationOnHeapCorruption();
+
+    // Get the path of our executable.
+    wchar_t exePath[MAX_PATH];
+    if (!::GetModuleFileNameW(0, exePath, _countof(exePath)))
+        return fatalError(L&quot;Unknown Program&quot;, L&quot;Failed to determine name of executable: &quot; + getLastErrorString(::GetLastError()));
+
+    ::PathRemoveExtensionW(exePath);
+
+    wstring programName = ::PathFindFileNameW(exePath);
+
+    if (!modifyPath(programName))
+        return 1;
+
+    // Load our corresponding DLL.
+    wstring dllName = programName + L&quot;Lib.dll&quot;;
+    if (!::PathRemoveFileSpecW(exePath))
+        return fatalError(programName, L&quot;::PathRemoveFileSpecW failed: &quot; + getLastErrorString(::GetLastError()));
+    if (!::PathAppendW(exePath, dllName.c_str()))
+        return fatalError(programName, L&quot;::PathAppendW failed: &quot; + getLastErrorString(::GetLastError()));
+    HMODULE module = ::LoadLibraryW(exePath);
+    if (!module)
+        return fatalError(programName, L&quot;::LoadLibraryW failed: \npath=&quot; + wstring(exePath) + L&quot;\n&quot; + getLastErrorString(::GetLastError()));
+
+#if USE_CONSOLE_ENTRY_POINT
+    typedef int (WINAPI*EntryPoint)(int, const char*[]);
+#if defined _M_AMD64 || defined _WIN64
+    const char* entryPointName = &quot;dllLauncherEntryPoint&quot;;
+#else
+    const char* entryPointName = &quot;_dllLauncherEntryPoint@8&quot;;
+#endif
+#else
+    typedef int (WINAPI*EntryPoint)(HINSTANCE, HINSTANCE, LPWSTR, int);
+#if defined _M_AMD64 || defined _WIN64
+    const char* entryPointName = &quot;dllLauncherEntryPoint&quot;;
+#else
+    const char* entryPointName = &quot;_dllLauncherEntryPoint@16&quot;;
+#endif
+#endif
+
+    EntryPoint entryPoint = reinterpret_cast&lt;EntryPoint&gt;(::GetProcAddress(module, entryPointName));
+    if (!entryPoint)
+        return fatalError(programName, L&quot;Failed to find dllLauncherEntryPoint function: &quot; + getLastErrorString(::GetLastError()));
+
+#if USE_CONSOLE_ENTRY_POINT
+    return entryPoint(argc, argv);
+#else
+    return entryPoint(hInstance, hPrevInstance, lpstrCmdLine, nCmdShow);
+#endif
+}
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCoreshellPlatformWincmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/shell/PlatformWin.cmake (201911 => 201912)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/shell/PlatformWin.cmake        2016-06-10 05:42:28 UTC (rev 201911)
+++ trunk/Source/JavaScriptCore/shell/PlatformWin.cmake        2016-06-10 05:53:57 UTC (rev 201912)
</span><span class="lines">@@ -12,7 +12,7 @@
</span><span class="cx">     add_definitions(-DWIN_CAIRO)
</span><span class="cx"> endif ()
</span><span class="cx"> 
</span><del>-set(JSC_SOURCES ${JAVASCRIPTCORE_DIR}/JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp)
</del><ins>+set(JSC_SOURCES ${JAVASCRIPTCORE_DIR}/shell/DLLLauncherMain.cpp)
</ins><span class="cx"> set(JSC_LIBRARIES shlwapi)
</span><span class="cx"> add_definitions(-DUSE_CONSOLE_ENTRY_POINT)
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>