Auto merge of #13508 - tschneidereit:fix-sh-methods-codegen, r=emilio

Fix codegen for iterable's forEach method

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13451 (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

The `forEach` method installed on iterable DOM interfaces uses SpiderMonkey's self-hosted implementation of `Array.prototype.forEach`, but it has the wrong value for `nargs`, causing failing asserts in debug and wrong behavior in release builds.

Fixes #13451

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13508)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-09-29 20:21:32 -05:00 committed by GitHub
commit c212234258

View file

@ -1605,7 +1605,7 @@ class MethodDefiner(PropertyDefiner):
"name": "forEach",
"methodInfo": False,
"selfHostedName": "ArrayForEach",
"length": 0,
"length": 1,
"condition": PropertyDefiner.getControllingCondition(m,
descriptor)
})