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 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 m_strings.clear(); | 479 m_strings.clear(); |
480 | 480 |
481 m_topExpr = nullptr; | 481 m_topExpr = nullptr; |
482 | 482 |
483 if (m_gotNamespaceError) | 483 if (m_gotNamespaceError) |
484 exceptionState.throwDOMException(NamespaceError, "The string '" + st
atement + "' contains unresolvable namespaces."); | 484 exceptionState.throwDOMException(NamespaceError, "The string '" + st
atement + "' contains unresolvable namespaces."); |
485 else | 485 else |
486 exceptionState.throwDOMException(SyntaxError, "The string '" + state
ment + "' is not a valid XPath expression."); | 486 exceptionState.throwDOMException(SyntaxError, "The string '" + state
ment + "' is not a valid XPath expression."); |
487 return nullptr; | 487 return nullptr; |
488 } | 488 } |
489 ASSERT(m_strings.size() == 0); | 489 DCHECK_EQ(m_strings.size(), 0u); |
490 Expression* result = m_topExpr; | 490 Expression* result = m_topExpr; |
491 m_topExpr = nullptr; | 491 m_topExpr = nullptr; |
492 | 492 |
493 return result; | 493 return result; |
494 } | 494 } |
495 | 495 |
496 void Parser::registerString(String* s) | 496 void Parser::registerString(String* s) |
497 { | 497 { |
498 if (s == 0) | 498 if (!s) |
499 return; | 499 return; |
500 | 500 |
501 ASSERT(!m_strings.contains(s)); | 501 DCHECK(!m_strings.contains(s)); |
502 | |
503 m_strings.add(wrapUnique(s)); | 502 m_strings.add(wrapUnique(s)); |
504 } | 503 } |
505 | 504 |
506 void Parser::deleteString(String* s) | 505 void Parser::deleteString(String* s) |
507 { | 506 { |
508 if (s == 0) | 507 if (!s) |
509 return; | 508 return; |
510 | 509 |
511 ASSERT(m_strings.contains(s)); | 510 DCHECK(m_strings.contains(s)); |
512 | |
513 m_strings.remove(s); | 511 m_strings.remove(s); |
514 } | 512 } |
OLD | NEW |