Changeset 157287 in webkit
- Timestamp:
- Oct 10, 2013, 8:51:44 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r157286 r157287 1 2013-10-10 Darin Adler <darin@apple.com> 2 3 REGRESSION (r157205?): Leaks in XPath 4 https://bugs.webkit.org/show_bug.cgi?id=122609 5 6 Reviewed by Andreas Kling. 7 8 * xml/XPathGrammar.y: Fixed warnings by adding missing "$$ = $1" to various rules. 9 Added local unique_ptr for NodeTest and ArgumentList in three rules, so they 10 won't be leaked. 11 1 12 2013-10-10 Gyuyoung Kim <gyuyoung.kim@samsung.com> 2 13 -
trunk/Source/WebCore/xml/XPathGrammar.y
r157224 r157287 115 115 AbsoluteLocationPath 116 116 { 117 $$ = $1; 117 118 $$->setAbsolute(); 118 119 } … … 148 149 RelativeLocationPath '/' Step 149 150 { 151 $$ = $1; 150 152 $$->appendStep(std::unique_ptr<Step>($3)); 151 153 } … … 153 155 RelativeLocationPath DescendantOrSelf Step 154 156 { 157 $$ = $1; 155 158 $$->appendStep(std::unique_ptr<Step>($2)); 156 159 $$->appendStep(std::unique_ptr<Step>($3)); … … 161 164 NodeTest OptionalPredicateList 162 165 { 166 std::unique_ptr<Step::NodeTest> nodeTest($1); 163 167 std::unique_ptr<Vector<std::unique_ptr<Expression>>> predicateList($2); 164 168 if (predicateList) 165 $$ = new Step(Step::ChildAxis, std::move(* $1), std::move(*predicateList));169 $$ = new Step(Step::ChildAxis, std::move(*nodeTest), std::move(*predicateList)); 166 170 else 167 $$ = new Step(Step::ChildAxis, std::move(* $1));171 $$ = new Step(Step::ChildAxis, std::move(*nodeTest)); 168 172 } 169 173 | … … 188 192 AxisSpecifier NodeTest OptionalPredicateList 189 193 { 194 std::unique_ptr<Step::NodeTest> nodeTest($2); 190 195 std::unique_ptr<Vector<std::unique_ptr<Expression>>> predicateList($3); 191 196 192 197 if (predicateList) 193 $$ = new Step($1, std::move(* $2), std::move(*predicateList));198 $$ = new Step($1, std::move(*nodeTest), std::move(*predicateList)); 194 199 else 195 $$ = new Step($1, std::move(* $2));200 $$ = new Step($1, std::move(*nodeTest)); 196 201 } 197 202 | … … 342 347 { 343 348 String name = adoptRef($1); 344 $$ = XPath::Function::create(name, std::move(*$3)).release(); 349 std::unique_ptr<Vector<std::unique_ptr<Expression>>> argumentList($3); 350 $$ = XPath::Function::create(name, std::move(*argumentList)).release(); 345 351 if (!$$) 346 352 YYABORT; … … 377 383 PathExpr: 378 384 LocationPath 385 { 386 $$ = $1; 387 } 379 388 | 380 389 FilterExpr
Note:
See TracChangeset
for help on using the changeset viewer.