Title: [105970] trunk/Source/_javascript_Core
Revision
105970
Author
aes...@apple.com
Date
2012-01-26 00:17:47 -0800 (Thu, 26 Jan 2012)

Log Message

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).

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (105969 => 105970)


--- trunk/Source/_javascript_Core/ChangeLog	2012-01-26 08:16:01 UTC (rev 105969)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-01-26 08:17:47 UTC (rev 105970)
@@ -1,3 +1,18 @@
+2012-01-26  Andy Estes  <aes...@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  <mr...@apple.com>
 
         Attempted Mac build fix after r105939.

Modified: trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h (105969 => 105970)


--- trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h	2012-01-26 08:16:01 UTC (rev 105969)
+++ trunk/Source/_javascript_Core/wtf/OwnPtrCommon.h	2012-01-26 08:17:47 UTC (rev 105970)
@@ -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 @@
             delete ptr;
     }
 
-#if OS(WIN)
+#if OS(WINDOWS)
     void deleteOwnedPtr(HBITMAP);
     void deleteOwnedPtr(HBRUSH);
     void deleteOwnedPtr(HDC);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to