summaryrefslogtreecommitdiffstats
path: root/js/src/jit/IonBuilder.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 14:47:39 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-25 14:47:39 +0200
commit6056525ced07af6c6c4f48ea605a2f4589821fdf (patch)
tree82643cc93120a04d160a819c951385225daf676d /js/src/jit/IonBuilder.cpp
parent4ee42e38e0a490eb4880b4a260e3cbe07dd486d1 (diff)
downloadUXP-6056525ced07af6c6c4f48ea605a2f4589821fdf.tar
UXP-6056525ced07af6c6c4f48ea605a2f4589821fdf.tar.gz
UXP-6056525ced07af6c6c4f48ea605a2f4589821fdf.tar.lz
UXP-6056525ced07af6c6c4f48ea605a2f4589821fdf.tar.xz
UXP-6056525ced07af6c6c4f48ea605a2f4589821fdf.zip
Bug 1341339 - Check for duplicates in processIterators
Issue #74
Diffstat (limited to 'js/src/jit/IonBuilder.cpp')
-rw-r--r--js/src/jit/IonBuilder.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp
index 534a48a90..26bba0656 100644
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -963,9 +963,12 @@ IonBuilder::processIterators()
Vector<MDefinition*, 8, SystemAllocPolicy> worklist;
for (size_t i = 0; i < iterators_.length(); i++) {
- if (!worklist.append(iterators_[i]))
- return false;
- iterators_[i]->setInWorklist();
+ MDefinition* iter = iterators_[i];
+ if (!iter->isInWorklist()) {
+ if (!worklist.append(iter))
+ return false;
+ iter->setInWorklist();
+ }
}
while (!worklist.empty()) {