| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> | 2 * Copyright 2005 Maksim Orlovich <maksim@kde.org> |
| 3 * Copyright (C) 2006 Apple Computer, Inc. | 3 * Copyright (C) 2006 Apple Computer, Inc. |
| 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #include "core/xml/XPathParser.h" | 28 #include "core/xml/XPathParser.h" |
| 29 | 29 |
| 30 #include "bindings/core/v8/ExceptionState.h" | 30 #include "bindings/core/v8/ExceptionState.h" |
| 31 #include "core/XPathGrammar.h" | 31 #include "core/XPathGrammar.h" |
| 32 #include "core/dom/ExceptionCode.h" | 32 #include "core/dom/ExceptionCode.h" |
| 33 #include "core/xml/XPathEvaluator.h" | 33 #include "core/xml/XPathEvaluator.h" |
| 34 #include "core/xml/XPathNSResolver.h" | 34 #include "core/xml/XPathNSResolver.h" |
| 35 #include "core/xml/XPathPath.h" | 35 #include "core/xml/XPathPath.h" |
| 36 #include "wtf/PtrUtil.h" |
| 36 #include "wtf/StdLibExtras.h" | 37 #include "wtf/StdLibExtras.h" |
| 37 #include "wtf/text/StringHash.h" | 38 #include "wtf/text/StringHash.h" |
| 38 | 39 |
| 39 using namespace blink; | 40 using namespace blink; |
| 40 using namespace WTF; | 41 using namespace WTF; |
| 41 using namespace Unicode; | 42 using namespace Unicode; |
| 42 using namespace XPath; | 43 using namespace XPath; |
| 43 | 44 |
| 44 Parser* Parser::currentParser = nullptr; | 45 Parser* Parser::currentParser = nullptr; |
| 45 | 46 |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 return result; | 494 return result; |
| 494 } | 495 } |
| 495 | 496 |
| 496 void Parser::registerString(String* s) | 497 void Parser::registerString(String* s) |
| 497 { | 498 { |
| 498 if (s == 0) | 499 if (s == 0) |
| 499 return; | 500 return; |
| 500 | 501 |
| 501 ASSERT(!m_strings.contains(s)); | 502 ASSERT(!m_strings.contains(s)); |
| 502 | 503 |
| 503 m_strings.add(adoptPtr(s)); | 504 m_strings.add(wrapUnique(s)); |
| 504 } | 505 } |
| 505 | 506 |
| 506 void Parser::deleteString(String* s) | 507 void Parser::deleteString(String* s) |
| 507 { | 508 { |
| 508 if (s == 0) | 509 if (s == 0) |
| 509 return; | 510 return; |
| 510 | 511 |
| 511 ASSERT(m_strings.contains(s)); | 512 ASSERT(m_strings.contains(s)); |
| 512 | 513 |
| 513 m_strings.remove(s); | 514 m_strings.remove(s); |
| 514 } | 515 } |
| OLD | NEW |