Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: Source/core/xml/XPathParser.cpp

Issue 17239008: Remove XPathException (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 12 matching lines...) Expand all
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 #include "core/xml/XPathParser.h" 29 #include "core/xml/XPathParser.h"
30 30
31 #include "core/dom/ExceptionCode.h" 31 #include "core/dom/ExceptionCode.h"
32 #include "core/xml/XPathEvaluator.h" 32 #include "core/xml/XPathEvaluator.h"
33 #include "core/xml/XPathException.h"
34 #include "core/xml/XPathNSResolver.h" 33 #include "core/xml/XPathNSResolver.h"
35 #include "core/xml/XPathPath.h" 34 #include "core/xml/XPathPath.h"
36 #include "core/xml/XPathStep.h" 35 #include "core/xml/XPathStep.h"
37 #include <wtf/StdLibExtras.h> 36 #include <wtf/StdLibExtras.h>
38 #include <wtf/text/StringHash.h> 37 #include <wtf/text/StringHash.h>
39 38
40 using namespace WebCore; 39 using namespace WebCore;
41 using namespace WTF; 40 using namespace WTF;
42 using namespace Unicode; 41 using namespace Unicode;
43 using namespace XPath; 42 using namespace XPath;
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 m_strings.clear(); 496 m_strings.clear();
498 497
499 deleteAllValues(m_nodeTests); 498 deleteAllValues(m_nodeTests);
500 m_nodeTests.clear(); 499 m_nodeTests.clear();
501 500
502 m_topExpr = 0; 501 m_topExpr = 0;
503 502
504 if (m_gotNamespaceError) 503 if (m_gotNamespaceError)
505 ec = NAMESPACE_ERR; 504 ec = NAMESPACE_ERR;
506 else 505 else
507 ec = XPathException::INVALID_EXPRESSION_ERR; 506 ec = SYNTAX_ERR;
508 return 0; 507 return 0;
509 } 508 }
510 509
511 ASSERT(m_parseNodes.size() == 1); 510 ASSERT(m_parseNodes.size() == 1);
512 ASSERT(*m_parseNodes.begin() == m_topExpr); 511 ASSERT(*m_parseNodes.begin() == m_topExpr);
513 ASSERT(m_expressionVectors.size() == 0); 512 ASSERT(m_expressionVectors.size() == 0);
514 ASSERT(m_predicateVectors.size() == 0); 513 ASSERT(m_predicateVectors.size() == 0);
515 ASSERT(m_strings.size() == 0); 514 ASSERT(m_strings.size() == 0);
516 ASSERT(m_nodeTests.size() == 0); 515 ASSERT(m_nodeTests.size() == 0);
517 516
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 { 619 {
621 if (t == 0) 620 if (t == 0)
622 return; 621 return;
623 622
624 ASSERT(m_nodeTests.contains(t)); 623 ASSERT(m_nodeTests.contains(t));
625 624
626 m_nodeTests.remove(t); 625 m_nodeTests.remove(t);
627 delete t; 626 delete t;
628 } 627 }
629 628
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698