OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> | 3 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> |
4 * Copyright (C) 2012 Google Inc. All rights reserved. | 4 * Copyright (C) 2012 Google Inc. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 return StringHasher::computeHashAndMaskTop8Bits(reinterpret_cast<const L
Char*>(buf.s), buf.length); | 351 return StringHasher::computeHashAndMaskTop8Bits(reinterpret_cast<const L
Char*>(buf.s), buf.length); |
352 } | 352 } |
353 | 353 |
354 static bool equal(StringImpl* const& str, const CharBuffer& buf) | 354 static bool equal(StringImpl* const& str, const CharBuffer& buf) |
355 { | 355 { |
356 return WTF::equal(str, buf.s, buf.length); | 356 return WTF::equal(str, buf.s, buf.length); |
357 } | 357 } |
358 | 358 |
359 static void translate(StringImpl*& location, const CharBuffer& buf, unsigned
hash) | 359 static void translate(StringImpl*& location, const CharBuffer& buf, unsigned
hash) |
360 { | 360 { |
361 location = StringImpl::createFromLiteral(buf.s, buf.length).leakRef(); | 361 location = StringImpl::create(buf.s, buf.length).leakRef(); |
362 location->setHash(hash); | 362 location->setHash(hash); |
363 location->setIsAtomic(true); | 363 location->setIsAtomic(true); |
364 } | 364 } |
365 }; | 365 }; |
366 | 366 |
367 PassRefPtr<StringImpl> AtomicString::add(const LChar* s, unsigned length) | 367 PassRefPtr<StringImpl> AtomicString::add(const LChar* s, unsigned length) |
368 { | 368 { |
369 if (!s) | 369 if (!s) |
370 return 0; | 370 return 0; |
371 | 371 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 } | 460 } |
461 | 461 |
462 #ifndef NDEBUG | 462 #ifndef NDEBUG |
463 void AtomicString::show() const | 463 void AtomicString::show() const |
464 { | 464 { |
465 m_string.show(); | 465 m_string.show(); |
466 } | 466 } |
467 #endif | 467 #endif |
468 | 468 |
469 } // namespace WTF | 469 } // namespace WTF |
OLD | NEW |