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

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

Issue 99083002: WIP: Migrate generated bindings to new ExceptionState constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase. Created 7 years 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
« no previous file with comments | « Source/core/xml/XPathExpression.cpp ('k') | Source/core/xml/XPathResult.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
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 "bindings/v8/ExceptionMessages.h"
32 #include "bindings/v8/ExceptionState.h" 31 #include "bindings/v8/ExceptionState.h"
33 #include "core/dom/ExceptionCode.h" 32 #include "core/dom/ExceptionCode.h"
34 #include "core/xml/XPathEvaluator.h" 33 #include "core/xml/XPathEvaluator.h"
35 #include "core/xml/XPathNSResolver.h" 34 #include "core/xml/XPathNSResolver.h"
36 #include "core/xml/XPathPath.h" 35 #include "core/xml/XPathPath.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;
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 490
492 deleteAllValues(m_strings); 491 deleteAllValues(m_strings);
493 m_strings.clear(); 492 m_strings.clear();
494 493
495 deleteAllValues(m_nodeTests); 494 deleteAllValues(m_nodeTests);
496 m_nodeTests.clear(); 495 m_nodeTests.clear();
497 496
498 m_topExpr = 0; 497 m_topExpr = 0;
499 498
500 if (m_gotNamespaceError) 499 if (m_gotNamespaceError)
501 exceptionState.throwDOMException(NamespaceError, ExceptionMessages:: failedToExecute("createExpression", "XPathExpression", "The string '" + statemen t + "' contains unresolvable namespaces.")); 500 exceptionState.throwDOMException(NamespaceError, "The string '" + st atement + "' contains unresolvable namespaces.");
502 else 501 else
503 exceptionState.throwDOMException(SyntaxError, ExceptionMessages::fai ledToExecute("createExpression", "XPathExpression", "The string '" + statement + "' is not a valid XPath expression.")); 502 exceptionState.throwDOMException(SyntaxError, "The string '" + state ment + "' is not a valid XPath expression.");
504 return 0; 503 return 0;
505 } 504 }
506 505
507 ASSERT(m_parseNodes.size() == 1); 506 ASSERT(m_parseNodes.size() == 1);
508 ASSERT(*m_parseNodes.begin() == m_topExpr); 507 ASSERT(*m_parseNodes.begin() == m_topExpr);
509 ASSERT(m_expressionVectors.size() == 0); 508 ASSERT(m_expressionVectors.size() == 0);
510 ASSERT(m_predicateVectors.size() == 0); 509 ASSERT(m_predicateVectors.size() == 0);
511 ASSERT(m_strings.size() == 0); 510 ASSERT(m_strings.size() == 0);
512 ASSERT(m_nodeTests.size() == 0); 511 ASSERT(m_nodeTests.size() == 0);
513 512
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 { 615 {
617 if (t == 0) 616 if (t == 0)
618 return; 617 return;
619 618
620 ASSERT(m_nodeTests.contains(t)); 619 ASSERT(m_nodeTests.contains(t));
621 620
622 m_nodeTests.remove(t); 621 m_nodeTests.remove(t);
623 delete t; 622 delete t;
624 } 623 }
625 624
OLDNEW
« no previous file with comments | « Source/core/xml/XPathExpression.cpp ('k') | Source/core/xml/XPathResult.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698