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

Unified Diff: src/jsregexp.cc

Issue 11442: Fix test crashes I just introduced. (Closed)
Patch Set: Created 12 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
diff --git a/src/jsregexp.cc b/src/jsregexp.cc
index 1395f4d3a4aabcbbee97991b866b9f19f22b90f1..d592b0dcd307b8c2b60b0dfde3ea3b79b4d9615f 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -1670,9 +1670,9 @@ RegExpNode* ActionNode::PropagateInterest(NodeInfo* info) {
if (sibling != NULL) return sibling;
EnsureSiblings();
ActionNode* action = new ActionNode(*this);
- action->set_on_success(action->on_success()->PropagateInterest(info));
action->info()->AdoptInterests(info);
AddSibling(action);
+ action->set_on_success(action->on_success()->PropagateInterest(info));
return action;
}
@@ -1682,6 +1682,8 @@ RegExpNode* ChoiceNode::PropagateInterest(NodeInfo* info) {
if (sibling != NULL) return sibling;
EnsureSiblings();
ChoiceNode* choice = new ChoiceNode(*this);
+ choice->info()->AdoptInterests(info);
+ AddSibling(choice);
ZoneList<GuardedAlternative>* old_alternatives = alternatives();
int count = old_alternatives->length();
choice->alternatives_ = new ZoneList<GuardedAlternative>(count);
@@ -1690,8 +1692,6 @@ RegExpNode* ChoiceNode::PropagateInterest(NodeInfo* info) {
alternative.set_node(alternative.node()->PropagateInterest(info));
choice->alternatives()->Add(alternative);
}
- choice->info()->AdoptInterests(info);
- AddSibling(choice);
return choice;
}
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698