Changeset 55621 in webkit


Ignore:
Timestamp:
Mar 6, 2010 5:57:23 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-06 Kwang Yul Seo <skyul@company100.net>

Reviewed by Eric Seidel.

[BREWMP] Share OwnPtr.
https://bugs.webkit.org/show_bug.cgi?id=35776

Share OwnPtr implementation with BREW MP and remove OwnPtrBrew.

  • wtf/OwnPtrBrew.cpp: Added. (WTF::deleteOwnedPtr):
  • wtf/OwnPtrCommon.h:
  • wtf/brew/OwnPtrBrew.cpp: Removed.
  • wtf/brew/OwnPtrBrew.h: Removed.
Location:
trunk/JavaScriptCore
Files:
2 deleted
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r55615 r55621  
     12010-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
    1162010-03-06  Patrick Gansterer  <paroga@paroga.com>
    217
  • trunk/JavaScriptCore/wtf/OwnPtrBrew.cpp

    r55620 r55621  
    11/*
    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.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2524 */
    2625
    27 #ifndef WTF_OwnPtrCommon_h
    28 #define WTF_OwnPtrCommon_h
     26#include "config.h"
     27#include "OwnPtr.h"
    2928
    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>
    3932
    4033namespace WTF {
    4134
    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     }
     35void deleteOwnedPtr(IFileMgr* ptr)
     36{
     37    if (ptr)
     38        IFILEMGR_Release(ptr);
     39}
    4840
    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
     41void deleteOwnedPtr(IFile* ptr)
     42{
     43    if (ptr)
     44        IFILE_Release(ptr);
     45}
    5846
    59 } // namespace WTF
     47void deleteOwnedPtr(IBitmap* ptr)
     48{
     49    if (ptr)
     50        IBitmap_Release(ptr);
     51}
    6052
    61 #endif // WTF_OwnPtrCommon_h
     53}
  • trunk/JavaScriptCore/wtf/OwnPtrCommon.h

    r45669 r55621  
    22 * Copyright (C) 2009 Apple Inc. All rights reserved.
    33 * Copyright (C) 2009 Torch Mobile, Inc.
     4 * Copyright (C) 2010 Company 100 Inc.
    45 *
    56 * Redistribution and use in source and binary forms, with or without
     
    3839#endif
    3940
     41#if PLATFORM(BREWMP)
     42// Forward delcarations at this point avoid the need to include BREW includes
     43// in WTF headers.
     44typedef struct _IFileMgr IFileMgr;
     45typedef struct _IFile IFile;
     46typedef struct IBitmap IBitmap;
     47#endif
     48
    4049namespace WTF {
    4150
     
    5766#endif
    5867
     68#if PLATFORM(BREWMP)
     69    void deleteOwnedPtr(IFileMgr*);
     70    void deleteOwnedPtr(IFile*);
     71    void deleteOwnedPtr(IBitmap*);
     72#endif
     73
    5974} // namespace WTF
    6075
Note: See TracChangeset for help on using the changeset viewer.