Bug 1101032 - Fixed ExecutableAllocatorWin.cpp compilation on mingw. r=luke
authorJacek Caban <jacek@codeweavers.com>
Wed, 19 Nov 2014 11:08:34 +0100
changeset 240801 b036339d48699fc4ca24b3914c15d686c8752875
parent 240800 2582b6cec7b0044541a66a2aef397440e34bd67e
child 240802 40e56f99632b65fa07704b838cc8c3db2f1fe46f
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1101032
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1101032 - Fixed ExecutableAllocatorWin.cpp compilation on mingw. r=luke
js/src/jit/ExecutableAllocatorWin.cpp
--- a/js/src/jit/ExecutableAllocatorWin.cpp
+++ b/js/src/jit/ExecutableAllocatorWin.cpp
@@ -154,17 +154,17 @@ RegisterExecutableMemory(void *p, size_t
     r->unwindInfo.countOfUnwindCodes = 0;
     r->unwindInfo.frameRegister = 0;
     r->unwindInfo.frameOffset = 0;
     r->unwindInfo.exceptionHandler = offsetof(ExceptionHandlerRecord, thunk);
 
     // mov imm64, rax
     r->thunk[0]  = 0x48;
     r->thunk[1]  = 0xb8;
-    void *handler = &ExceptionHandler;
+    void *handler = JS_FUNC_TO_DATA_PTR(void *, ExceptionHandler);
     memcpy(&r->thunk[2], &handler, 8);
 
     // jmp rax
     r->thunk[10] = 0xff;
     r->thunk[11] = 0xe0;
 
     DWORD oldProtect;
     if (!VirtualProtect(p, pageSize, PAGE_EXECUTE_READ, &oldProtect))