Use OwnPtr instead of deleteAllValues in some of XPath
Created attachment 212120 [details] Early incomplete patch
Created attachment 213660 [details] Patch
Attachment 213660 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Attr.h', u'Source/WebCore/xml/XPathExpression.cpp', u'Source/WebCore/xml/XPathExpression.h', u'Source/WebCore/xml/XPathExpressionNode.cpp', u'Source/WebCore/xml/XPathExpressionNode.h', u'Source/WebCore/xml/XPathFunctions.cpp', u'Source/WebCore/xml/XPathFunctions.h', u'Source/WebCore/xml/XPathGrammar.y', u'Source/WebCore/xml/XPathNodeSet.cpp', u'Source/WebCore/xml/XPathNodeSet.h', u'Source/WebCore/xml/XPathParser.cpp', u'Source/WebCore/xml/XPathParser.h', u'Source/WebCore/xml/XPathPath.cpp', u'Source/WebCore/xml/XPathPath.h', u'Source/WebCore/xml/XPathPredicate.cpp', u'Source/WebCore/xml/XPathPredicate.h', u'Source/WebCore/xml/XPathStep.cpp', u'Source/WebCore/xml/XPathStep.h', u'Source/WebCore/xml/XPathUtil.cpp', u'Source/WebCore/xml/XPathValue.cpp', u'Source/WebCore/xml/XPathValue.h']" exit_code: 1 Source/WebCore/xml/XPathPredicate.h:50: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathParser.cpp:45: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/xml/XPathStep.h:74: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathStep.h:75: Missing spaces around && [whitespace/operators] [3] Total errors found: 4 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213660 [details] Patch Attachment 213660 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/3746044
Comment on attachment 213660 [details] Patch Attachment 213660 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/3710122 New failing tests: fast/xpath/4XPath/Core/test_core_functions.html fast/xpath/implicit-node-args.html fast/xpath/4XPath/Core/test_boolean_expr.html fast/xpath/union-context-node.xhtml fast/xpath/node-name-case-sensitivity.html inspector/console/console-xpath.html inspector/network-status-non-http.html fast/xpath/xpath-functional-test.html fast/xpath/py-dom-xpath/predicates.html fast/xpath/ambiguous-operators.html fast/xpath/py-dom-xpath/axes.html fast/xpath/substring-non-positive-postion.html fast/xpath/position.html fast/xpath/4XPath/Core/test_nodeset_expr.html fast/xpath/substring-nan-position.html fast/xpath/document-order.html fast/xpath/py-dom-xpath/functions.html fast/xpath/4XPath/Core/test_literal_expr.html inspector/extensions/extensions-audits.html fast/xpath/nan-to-boolean.html fast/xpath/py-dom-xpath/paths.html fast/xpath/py-dom-xpath/expressions.html fast/xpath/xpath-detached-import-assert.html fast/xpath/py-dom-xpath/abbreviations.html fast/xpath/4XPath/Core/test_parser.html fast/xpath/empty-string-substring.html fast/xpath/id-path.html fast/xpath/xpath-detached-nodes.html fast/xpath/4XPath/Core/test_numeric_expr.html fast/xpath/attribute-node-predicate.html
Created attachment 213667 [details] Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-11 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Comment on attachment 213660 [details] Patch Attachment 213660 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/3710125 New failing tests: fast/xpath/4XPath/Core/test_core_functions.html fast/xpath/implicit-node-args.html fast/xpath/4XPath/Core/test_boolean_expr.html fast/xpath/union-context-node.xhtml fast/xpath/node-name-case-sensitivity.html inspector/console/console-xpath.html inspector/network-status-non-http.html fast/xpath/xpath-functional-test.html fast/xpath/py-dom-xpath/predicates.html fast/xpath/ambiguous-operators.html fast/xpath/py-dom-xpath/axes.html fast/xpath/substring-non-positive-postion.html fast/xpath/position.html fast/xpath/4XPath/Core/test_nodeset_expr.html fast/xpath/substring-nan-position.html fast/xpath/document-order.html fast/xpath/py-dom-xpath/functions.html fast/xpath/4XPath/Core/test_literal_expr.html inspector/extensions/extensions-audits.html fast/xpath/nan-to-boolean.html fast/xpath/py-dom-xpath/paths.html fast/xpath/py-dom-xpath/expressions.html fast/xpath/xpath-detached-import-assert.html fast/xpath/py-dom-xpath/abbreviations.html fast/xpath/4XPath/Core/test_parser.html fast/xpath/empty-string-substring.html fast/xpath/id-path.html fast/xpath/xpath-detached-nodes.html fast/xpath/4XPath/Core/test_numeric_expr.html fast/xpath/attribute-node-predicate.html
Created attachment 213671 [details] Archive of layout-test-results from webkit-ews-02 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Created attachment 213672 [details] Patch
Attachment 213672 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Attr.h', u'Source/WebCore/xml/XPathExpression.cpp', u'Source/WebCore/xml/XPathExpression.h', u'Source/WebCore/xml/XPathExpressionNode.cpp', u'Source/WebCore/xml/XPathExpressionNode.h', u'Source/WebCore/xml/XPathFunctions.cpp', u'Source/WebCore/xml/XPathFunctions.h', u'Source/WebCore/xml/XPathGrammar.y', u'Source/WebCore/xml/XPathNodeSet.cpp', u'Source/WebCore/xml/XPathNodeSet.h', u'Source/WebCore/xml/XPathParser.cpp', u'Source/WebCore/xml/XPathParser.h', u'Source/WebCore/xml/XPathPath.cpp', u'Source/WebCore/xml/XPathPath.h', u'Source/WebCore/xml/XPathPredicate.cpp', u'Source/WebCore/xml/XPathPredicate.h', u'Source/WebCore/xml/XPathStep.cpp', u'Source/WebCore/xml/XPathStep.h', u'Source/WebCore/xml/XPathUtil.cpp', u'Source/WebCore/xml/XPathValue.cpp', u'Source/WebCore/xml/XPathValue.h']" exit_code: 1 Source/WebCore/xml/XPathPredicate.h:50: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathParser.cpp:45: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/xml/XPathStep.h:74: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathStep.h:75: Missing spaces around && [whitespace/operators] [3] Total errors found: 4 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213672 [details] Patch Attachment 213672 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/3611040
Created attachment 213679 [details] Patch
Attachment 213679 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Attr.h', u'Source/WebCore/xml/XPathExpression.cpp', u'Source/WebCore/xml/XPathExpression.h', u'Source/WebCore/xml/XPathExpressionNode.cpp', u'Source/WebCore/xml/XPathExpressionNode.h', u'Source/WebCore/xml/XPathFunctions.cpp', u'Source/WebCore/xml/XPathFunctions.h', u'Source/WebCore/xml/XPathGrammar.y', u'Source/WebCore/xml/XPathNodeSet.cpp', u'Source/WebCore/xml/XPathNodeSet.h', u'Source/WebCore/xml/XPathParser.cpp', u'Source/WebCore/xml/XPathParser.h', u'Source/WebCore/xml/XPathPath.cpp', u'Source/WebCore/xml/XPathPath.h', u'Source/WebCore/xml/XPathPredicate.cpp', u'Source/WebCore/xml/XPathPredicate.h', u'Source/WebCore/xml/XPathStep.cpp', u'Source/WebCore/xml/XPathStep.h', u'Source/WebCore/xml/XPathUtil.cpp', u'Source/WebCore/xml/XPathValue.cpp', u'Source/WebCore/xml/XPathValue.h']" exit_code: 1 Source/WebCore/xml/XPathPredicate.h:50: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathParser.cpp:45: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/xml/XPathStep.h:74: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathStep.h:75: Missing spaces around && [whitespace/operators] [3] Total errors found: 4 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213679 [details] Patch Attachment 213679 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/3645201
Created attachment 213693 [details] Patch
Attachment 213693 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Attr.h', u'Source/WebCore/xml/XPathExpression.cpp', u'Source/WebCore/xml/XPathExpression.h', u'Source/WebCore/xml/XPathExpressionNode.cpp', u'Source/WebCore/xml/XPathExpressionNode.h', u'Source/WebCore/xml/XPathFunctions.cpp', u'Source/WebCore/xml/XPathFunctions.h', u'Source/WebCore/xml/XPathGrammar.y', u'Source/WebCore/xml/XPathNodeSet.cpp', u'Source/WebCore/xml/XPathNodeSet.h', u'Source/WebCore/xml/XPathParser.cpp', u'Source/WebCore/xml/XPathParser.h', u'Source/WebCore/xml/XPathPath.cpp', u'Source/WebCore/xml/XPathPath.h', u'Source/WebCore/xml/XPathPredicate.cpp', u'Source/WebCore/xml/XPathPredicate.h', u'Source/WebCore/xml/XPathStep.cpp', u'Source/WebCore/xml/XPathStep.h', u'Source/WebCore/xml/XPathUtil.cpp', u'Source/WebCore/xml/XPathValue.cpp', u'Source/WebCore/xml/XPathValue.h']" exit_code: 1 Source/WebCore/xml/XPathPredicate.h:50: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathParser.cpp:45: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/xml/XPathStep.h:74: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathStep.h:75: Missing spaces around && [whitespace/operators] [3] Total errors found: 4 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213693 [details] Patch Attachment 213693 [details] did not pass win-ews (win): Output: http://webkit-queues.appspot.com/results/3747158
Comment on attachment 213693 [details] Patch Anders pointed out that the various arguments should all be passed by value, not rvalue reference. I’ll fix that. And to fix Windows, need to work around a compile issue in the NodeTest class.
Created attachment 213753 [details] Patch
Attachment 213753 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/dom/Attr.h', u'Source/WebCore/xml/XPathExpression.cpp', u'Source/WebCore/xml/XPathExpression.h', u'Source/WebCore/xml/XPathExpressionNode.cpp', u'Source/WebCore/xml/XPathExpressionNode.h', u'Source/WebCore/xml/XPathFunctions.cpp', u'Source/WebCore/xml/XPathFunctions.h', u'Source/WebCore/xml/XPathGrammar.y', u'Source/WebCore/xml/XPathNodeSet.cpp', u'Source/WebCore/xml/XPathNodeSet.h', u'Source/WebCore/xml/XPathParser.cpp', u'Source/WebCore/xml/XPathParser.h', u'Source/WebCore/xml/XPathPath.cpp', u'Source/WebCore/xml/XPathPath.h', u'Source/WebCore/xml/XPathPredicate.cpp', u'Source/WebCore/xml/XPathPredicate.h', u'Source/WebCore/xml/XPathStep.cpp', u'Source/WebCore/xml/XPathStep.h', u'Source/WebCore/xml/XPathUtil.cpp', u'Source/WebCore/xml/XPathValue.cpp', u'Source/WebCore/xml/XPathValue.h']" exit_code: 1 Source/WebCore/xml/XPathPredicate.h:50: Missing spaces around && [whitespace/operators] [3] Source/WebCore/xml/XPathParser.cpp:45: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 22 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 213753 [details] Patch Hooray, builds on Windows. Time to get this reviewed and landed!
Comment on attachment 213753 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213753&action=review > Source/WebCore/xml/XPathExpression.h:53 > + XPathExpression(std::unique_ptr<XPath::Expression>); Could make this explicit for good measure. > Source/WebCore/xml/XPathNodeSet.h:39 > + NodeSet(PassRefPtr<Node> node) : m_isSorted(true), m_subtreesAreDisjoint(false), m_nodes(1, node) { } Explicit (if possible).
Committed r157205: <http://trac.webkit.org/changeset/157205>
I'm now seeing leaks on LeaksViewer that I think are new: WTF::Mutex::operator new(unsigned long) WebCore::XPath::Step::NodeTest::operator new(unsigned long) xpathyyparse(WebCore::XPath::Parser&) WebCore::XPath::Parser::parseStatement(WTF::String const&, WebCore::XPathNSResolver*, int&) WebCore::XPathExpression::createExpression(WTF::String const&, WebCore::XPathNSResolver*, int&) WebCore::XPathEvaluator::createExpression(WTF::String const&, WebCore::XPathNSResolver*, int&) WebCore::XPathEvaluator::evaluate(WTF::String const&, WebCore::Node*, WebCore::XPathNSResolver*, unsigned short, WebCore::XPathResult*, int&) Darin, will you have the time to look into this? I don't know which test leaks, but almost all of them should be in fast/xpath.
(In reply to comment #24) > Darin, will you have the time to look into this? I don't know which test leaks, but almost all of them should be in fast/xpath. Not today, but tonight.
Filed bug 122609. I confirmed locally that the leaks are new.
*** Bug 125389 has been marked as a duplicate of this bug. ***