Changeset 69118 in webkit


Ignore:
Timestamp:
Oct 5, 2010 10:01:07 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-05 Kwang Yul Seo <skyul@company100.net>

Reviewed by Kent Tamura.

[BREWMP] Use PlatformRefPtr instead of OwnPtr in FileSystem
https://bugs.webkit.org/show_bug.cgi?id=47025

PlatformRefPtr is a better choice here because all Brew MP instances are
reference counted.

  • platform/brew/FileSystemBrew.cpp: (WebCore::getFileSize): (WebCore::fileExists): (WebCore::deleteFile): (WebCore::deleteEmptyDirectory): (WebCore::canonicalPath): (WebCore::makeAllDirectories): (WebCore::openTemporaryFile):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r69117 r69118  
     12010-10-05  Kwang Yul Seo  <skyul@company100.net>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [BREWMP] Use PlatformRefPtr instead of OwnPtr in FileSystem
     6        https://bugs.webkit.org/show_bug.cgi?id=47025
     7
     8        PlatformRefPtr is a better choice here because all Brew MP instances are
     9        reference counted.
     10
     11        * platform/brew/FileSystemBrew.cpp:
     12        (WebCore::getFileSize):
     13        (WebCore::fileExists):
     14        (WebCore::deleteFile):
     15        (WebCore::deleteEmptyDirectory):
     16        (WebCore::canonicalPath):
     17        (WebCore::makeAllDirectories):
     18        (WebCore::openTemporaryFile):
     19
    1202010-10-05  Martin Robinson  <mrobinson@igalia.com>
    221
  • trunk/WebCore/platform/brew/FileSystemBrew.cpp

    r68342 r69118  
    3838#include <AEEStdLib.h>
    3939
    40 #include <wtf/OwnPtr.h>
    41 #include <wtf/PassOwnPtr.h>
    4240#include <wtf/RandomNumber.h>
     41#include <wtf/brew/RefPtrBrew.h>
    4342#include <wtf/brew/ShellBrew.h>
    4443#include <wtf/text/CString.h>
     
    4847bool getFileSize(const String& path, long long& result)
    4948{
    50     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     49    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    5150    FileInfo info;
    5251
     
    6867bool fileExists(const String& path)
    6968{
    70     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     69    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    7170
    7271    return (IFILEMGR_Test(fileMgr.get(), path.utf8().data()) == SUCCESS);
     
    7574bool deleteFile(const String& path)
    7675{
    77     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     76    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    7877
    7978    return (IFILEMGR_Remove(fileMgr.get(), path.utf8().data()) == SUCCESS);
     
    8281bool deleteEmptyDirectory(const String& path)
    8382{
    84     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     83    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    8584
    8685    return (IFILEMGR_RmDir(fileMgr.get(), path.utf8().data()) == SUCCESS);
     
    111110static String canonicalPath(const String& path)
    112111{
    113     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     112    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    114113
    115114    // Get the buffer size required to resolve the path.
     
    164163bool makeAllDirectories(const String& path)
    165164{
    166     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     165    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    167166
    168167    return makeAllDirectories(fileMgr.get(), canonicalPath(path));
     
    194193    String tempPath("fs:/~/tmp");
    195194
    196     OwnPtr<IFileMgr> fileMgr = createInstance<IFileMgr>(AEECLSID_FILEMGR);
     195    PlatformRefPtr<IFileMgr> fileMgr = createRefPtrInstance<IFileMgr>(AEECLSID_FILEMGR);
    197196
    198197    // Create the temporary directory if it does not exist.
Note: See TracChangeset for help on using the changeset viewer.