Changeset 172951 in webkit


Ignore:
Timestamp:
Aug 25, 2014 11:43:16 PM (10 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

Generate toFile() instead of manual functions.
https://bugs.webkit.org/show_bug.cgi?id=136207

Reviewed by Darin Adler.

No new tests, no behavior changes.

  • fileapi/Blob.h: Define BLOB_TYPE_CASTS.
  • fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile().

(WebCore::toFile): Deleted.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r172948 r172951  
     12014-08-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Generate toFile() instead of manual functions.
     4        https://bugs.webkit.org/show_bug.cgi?id=136207
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests, no behavior changes.
     9
     10        * fileapi/Blob.h: Define BLOB_TYPE_CASTS.
     11        * fileapi/File.h: Use BLOB_TYPE_CASTS to generate toFile().
     12        (WebCore::toFile): Deleted.
     13
    1142014-08-25  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/fileapi/Blob.h

    r170774 r172951  
    113113};
    114114
     115#define BLOB_TYPE_CASTS(ToValueTypeName, predicate) \
     116    TYPE_CASTS_BASE(ToValueTypeName, Blob, object, blob->predicate, blob.predicate)
     117
    115118} // namespace WebCore
    116119
  • trunk/Source/WebCore/fileapi/File.h

    r168554 r172951  
    8484};
    8585
    86 inline File* toFile(Blob* blob)
    87 {
    88     ASSERT_WITH_SECURITY_IMPLICATION(!blob || blob->isFile());
    89     return static_cast<File*>(blob);
    90 }
    91 
    92 inline const File* toFile(const Blob* blob)
    93 {
    94     ASSERT_WITH_SECURITY_IMPLICATION(!blob || blob->isFile());
    95     return static_cast<const File*>(blob);
    96 }
     86BLOB_TYPE_CASTS(File, isFile())
    9787
    9888} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.