REGRESSION (r105555): Incorrect use of OS() macro breaks OwnPtr when used with Win32...
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 08:17:47 +0000 (08:17 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Jan 2012 08:17:47 +0000 (08:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77073

Reviewed by Ryosuke Niwa.

r105555 changed PLATFORM(WIN) to OS(WIN), but WTF_OS_WIN isn't defined.
This should have been changed to OS(WINDOWS). This causes the
preprocessor to strip out Win32 data type overrides for deleteOwnedPtr,
causing allocations made by Win32 to be deleted by fastmalloc.

* wtf/OwnPtrCommon.h:
(WTF): Use OS(WINDOWS) instead of OS(WIN).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105970 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wtf/OwnPtrCommon.h

index 129a32f..f4d8a0e 100644 (file)
@@ -1,3 +1,18 @@
+2012-01-26  Andy Estes  <aestes@apple.com>
+
+        REGRESSION (r105555): Incorrect use of OS() macro breaks OwnPtr when used with Win32 data types
+        https://bugs.webkit.org/show_bug.cgi?id=77073
+
+        Reviewed by Ryosuke Niwa.
+        
+        r105555 changed PLATFORM(WIN) to OS(WIN), but WTF_OS_WIN isn't defined.
+        This should have been changed to OS(WINDOWS). This causes the
+        preprocessor to strip out Win32 data type overrides for deleteOwnedPtr,
+        causing allocations made by Win32 to be deleted by fastmalloc.
+
+        * wtf/OwnPtrCommon.h:
+        (WTF): Use OS(WINDOWS) instead of OS(WIN).
+
 2012-01-25  Mark Rowe  <mrowe@apple.com>
 
         Attempted Mac build fix after r105939.
index b8b78a2..315db89 100644 (file)
@@ -28,7 +28,7 @@
 #ifndef WTF_OwnPtrCommon_h
 #define WTF_OwnPtrCommon_h
 
-#if OS(WIN)
+#if OS(WINDOWS)
 typedef struct HBITMAP__* HBITMAP;
 typedef struct HBRUSH__* HBRUSH;
 typedef struct HDC__* HDC;
@@ -54,7 +54,7 @@ namespace WTF {
             delete ptr;
     }
 
-#if OS(WIN)
+#if OS(WINDOWS)
     void deleteOwnedPtr(HBITMAP);
     void deleteOwnedPtr(HBRUSH);
     void deleteOwnedPtr(HDC);