OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller ( mueller@kde.org ) | 4 * (C) 2001 Dirk Mueller ( mueller@kde.org ) |
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) | 6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "wtf/PartitionAlloc.h" | 30 #include "wtf/PartitionAlloc.h" |
31 #include "wtf/StdLibExtras.h" | 31 #include "wtf/StdLibExtras.h" |
32 #include "wtf/WTF.h" | 32 #include "wtf/WTF.h" |
33 #include "wtf/text/AtomicString.h" | 33 #include "wtf/text/AtomicString.h" |
34 #include "wtf/text/StringBuffer.h" | 34 #include "wtf/text/StringBuffer.h" |
35 #include "wtf/text/StringHash.h" | 35 #include "wtf/text/StringHash.h" |
36 #include "wtf/unicode/CharacterNames.h" | 36 #include "wtf/unicode/CharacterNames.h" |
37 | 37 |
38 #ifdef STRING_STATS | 38 #ifdef STRING_STATS |
39 #include "wtf/DataLog.h" | 39 #include "wtf/DataLog.h" |
40 #include "wtf/MainThread.h" | |
41 #include "wtf/ProcessID.h" | 40 #include "wtf/ProcessID.h" |
42 #include "wtf/RefCounted.h" | 41 #include "wtf/RefCounted.h" |
43 #include <unistd.h> | 42 #include <unistd.h> |
44 #endif | 43 #endif |
45 | 44 |
46 using namespace std; | 45 using namespace std; |
47 | 46 |
48 namespace WTF { | 47 namespace WTF { |
49 | 48 |
50 using namespace Unicode; | 49 using namespace Unicode; |
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2066 | 2065 |
2067 size_t StringImpl::sizeInBytes() const | 2066 size_t StringImpl::sizeInBytes() const |
2068 { | 2067 { |
2069 size_t size = length(); | 2068 size_t size = length(); |
2070 if (!is8Bit()) | 2069 if (!is8Bit()) |
2071 size *= 2; | 2070 size *= 2; |
2072 return size + sizeof(*this); | 2071 return size + sizeof(*this); |
2073 } | 2072 } |
2074 | 2073 |
2075 } // namespace WTF | 2074 } // namespace WTF |
OLD | NEW |