JavaScriptCore/ChangeLog

 12010-02-13 mingw64 <vanboxem.ruben@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Mingw-w64 fixes for WebCore and JavaScriptCore
 6 https://bugs.webkit.org/show_bug.cgi?id=34922
 7
 8 * runtime/Collector.cpp: functions are included in mingw-w64, so don't use mingw.org codepath
 9 (JSC::Heap::allocateBlock):
 10 (JSC::Heap::freeBlockPtr):
 11 (JSC::currentThreadStackBase):
 12
1132010-02-12 Gavin Barraclough <barraclough@apple.com>
214
315 Reviewed by Oliver Hunt.
54753

JavaScriptCore/runtime/Collector.cpp

@@NEVER_INLINE CollectorBlock* Heap::alloc
229229#elif OS(WINCE)
230230 void* address = VirtualAlloc(NULL, BLOCK_SIZE, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
231231#elif OS(WINDOWS)
232 #if COMPILER(MINGW)
 232#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR)
233233 void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
234234#else
235235 void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);

@@NEVER_INLINE void Heap::freeBlockPtr(Col
320320#elif OS(WINCE)
321321 VirtualFree(block, 0, MEM_RELEASE);
322322#elif OS(WINDOWS)
323 #if COMPILER(MINGW)
 323#if COMPILER(MINGW) && !defined(__MINGW64_VERSION_MAJOR)
324324 __mingw_aligned_free(block);
325325#else
326326 _aligned_free(block);

@@static inline void* currentThreadStackBa
574574 MOV pTib, EAX
575575 }
576576 return static_cast<void*>(pTib->StackBase);
577 #elif OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
 577#elif OS(WINDOWS) && CPU(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR))
578578 // FIXME: why only for MSVC?
579579 PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb());
580580 return reinterpret_cast<void*>(pTib->StackBase);
54753

WebCore/ChangeLog

 12010-02-13 mingw64 <vanboxem.ruben@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Mingw-w64 fixes for WebCore and JavaScriptCore
 6 https://bugs.webkit.org/show_bug.cgi?id=34922
 7
 8 No new tests. (OOPS!)
 9
 10 * platform/Arena.h: fix pointer cast size (Win64 has 64-bit pointer)
 11 * platform/text/TextStream.cpp: let mingw64 use msvc codepath
 12 * platform/text/TextStream.h: let mingw64 use msvc codepath
 13 * plugins/win/PluginViewWin.cpp: fix pointer cast (win64 uses 64-bit pointers)
 14 (WebCore::PluginView::paintIntoTransformedContext):
 15 (WebCore::PluginView::setNPWindowRect):
 16 (WebCore::PluginView::platformStart):
 17
1182010-01-05 Ojan Vafai <ojan@chromium.org>
219
320 Reviewed by Dan Bernstein.
54753

WebCore/platform/Arena.h

4444
4545namespace WebCore {
4646
47 typedef unsigned long uword;
 47typedef uintptr_t uword;
4848
4949struct Arena {
5050 Arena* next; // next arena
54753

WebCore/platform/text/TextStream.cpp

@@String TextStream::release()
108108 return String::adopt(m_text);
109109}
110110
111 #if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
 111#if OS(WINDOWS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR))
112112TextStream& TextStream::operator<<(__int64 i)
113113{
114114 char buffer[printBufferSize];
54753

WebCore/platform/text/TextStream.h

@@public:
4545 TextStream& operator<<(const char*);
4646 TextStream& operator<<(void*);
4747 TextStream& operator<<(const String&);
48 #if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
 48#if OS(WINDOWS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR))
4949 TextStream& operator<<(unsigned __int64);
5050 TextStream& operator<<(__int64);
5151#endif
54753

WebCore/plugins/win/PluginViewWin.cpp

@@void PluginView::paintIntoTransformedCon
544544
545545 NPEvent npEvent;
546546 npEvent.event = WM_WINDOWPOSCHANGED;
547  npEvent.lParam = reinterpret_cast<uint32>(&windowpos);
 547 npEvent.lParam = reinterpret_cast<uintptr_t>(&windowpos);
548548 npEvent.wParam = 0;
549549
550550 dispatchNPEvent(npEvent);

@@void PluginView::paintIntoTransformedCon
552552 setNPWindowRect(frameRect());
553553
554554 npEvent.event = WM_PAINT;
555  npEvent.wParam = reinterpret_cast<uint32>(hdc);
 555 npEvent.wParam = reinterpret_cast<uintptr_t>(hdc);
556556
557557 // This is supposed to be a pointer to the dirty rect, but it seems that the Flash plugin
558558 // ignores it so we just pass null.

@@void PluginView::setNPWindowRect(const I
829829#else
830830 WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC);
831831 if (currentWndProc != PluginViewWndProc)
832  m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)PluginViewWndProc);
 832 m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (intptr_t)PluginViewWndProc);
833833#endif
834834 }
835835}

@@bool PluginView::platformStart()
10211021
10221022 // Calling SetWindowLongPtrA here makes the window proc ASCII, which is required by at least
10231023 // the Shockwave Director plug-in.
1024 #if OS(WINDOWS) && PLATFORM(X86_64) && COMPILER(MSVC)
 1024#if OS(WINDOWS) && PLATFORM(X86_64) && (COMPILER(MSVC) || defined(__MINGW64_VERSION_MAJOR))
10251025 ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA);
10261026#elif OS(WINCE)
10271027 ::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc);
54753