Changeset 55621 in webkit
- Timestamp:
- Mar 6, 2010 5:57:23 AM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 deleted
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r55615 r55621 1 2010-03-06 Kwang Yul Seo <skyul@company100.net> 2 3 Reviewed by Eric Seidel. 4 5 [BREWMP] Share OwnPtr. 6 https://bugs.webkit.org/show_bug.cgi?id=35776 7 8 Share OwnPtr implementation with BREW MP and remove OwnPtrBrew. 9 10 * wtf/OwnPtrBrew.cpp: Added. 11 (WTF::deleteOwnedPtr): 12 * wtf/OwnPtrCommon.h: 13 * wtf/brew/OwnPtrBrew.cpp: Removed. 14 * wtf/brew/OwnPtrBrew.h: Removed. 15 1 16 2010-03-06 Patrick Gansterer <paroga@paroga.com> 2 17 -
trunk/JavaScriptCore/wtf/OwnPtrBrew.cpp
r55620 r55621 1 1 /* 2 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Torch Mobile, Inc. 2 * Copyright (C) 2010 Company 100 Inc. All rights reserved. 4 3 * 5 4 * Redistribution and use in source and binary forms, with or without … … 12 11 * documentation and/or other materials provided with the distribution. 13 12 * 14 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 15 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 18 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 19 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, … … 25 24 */ 26 25 27 #i fndef WTF_OwnPtrCommon_h28 # define WTF_OwnPtrCommon_h26 #include "config.h" 27 #include "OwnPtr.h" 29 28 30 #if PLATFORM(WIN) 31 typedef struct HBITMAP__* HBITMAP; 32 typedef struct HBRUSH__* HBRUSH; 33 typedef struct HDC__* HDC; 34 typedef struct HFONT__* HFONT; 35 typedef struct HPALETTE__* HPALETTE; 36 typedef struct HPEN__* HPEN; 37 typedef struct HRGN__* HRGN; 38 #endif 29 #include <AEEBitmap.h> 30 #include <AEEFile.h> 31 #include <AEEStdLib.h> 39 32 40 33 namespace WTF { 41 34 42 template <typename T> inline void deleteOwnedPtr(T* ptr) 43 { 44 typedef char known[sizeof(T) ? 1 : -1]; 45 if (sizeof(known)) 46 delete ptr; 47 } 35 void deleteOwnedPtr(IFileMgr* ptr) 36 { 37 if (ptr) 38 IFILEMGR_Release(ptr); 39 } 48 40 49 #if PLATFORM(WIN) 50 void deleteOwnedPtr(HBITMAP); 51 void deleteOwnedPtr(HBRUSH); 52 void deleteOwnedPtr(HDC); 53 void deleteOwnedPtr(HFONT); 54 void deleteOwnedPtr(HPALETTE); 55 void deleteOwnedPtr(HPEN); 56 void deleteOwnedPtr(HRGN); 57 #endif 41 void deleteOwnedPtr(IFile* ptr) 42 { 43 if (ptr) 44 IFILE_Release(ptr); 45 } 58 46 59 } // namespace WTF 47 void deleteOwnedPtr(IBitmap* ptr) 48 { 49 if (ptr) 50 IBitmap_Release(ptr); 51 } 60 52 61 #endif // WTF_OwnPtrCommon_h 53 } -
trunk/JavaScriptCore/wtf/OwnPtrCommon.h
r45669 r55621 2 2 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2009 Torch Mobile, Inc. 4 * Copyright (C) 2010 Company 100 Inc. 4 5 * 5 6 * Redistribution and use in source and binary forms, with or without … … 38 39 #endif 39 40 41 #if PLATFORM(BREWMP) 42 // Forward delcarations at this point avoid the need to include BREW includes 43 // in WTF headers. 44 typedef struct _IFileMgr IFileMgr; 45 typedef struct _IFile IFile; 46 typedef struct IBitmap IBitmap; 47 #endif 48 40 49 namespace WTF { 41 50 … … 57 66 #endif 58 67 68 #if PLATFORM(BREWMP) 69 void deleteOwnedPtr(IFileMgr*); 70 void deleteOwnedPtr(IFile*); 71 void deleteOwnedPtr(IBitmap*); 72 #endif 73 59 74 } // namespace WTF 60 75
Note: See TracChangeset
for help on using the changeset viewer.