From 9a8f5200473310ed7229bdd3bb2c5fdf768c67fa Mon Sep 17 00:00:00 2001 From: Till Schneidereit Date: Thu, 29 Sep 2016 12:35:11 +0200 Subject: [PATCH] Fix codegen for iterable's forEach method 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 --- components/script/dom/bindings/codegen/CodegenRust.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 711f44b4cd4..2f5f9a5bf82 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -1612,7 +1612,7 @@ class MethodDefiner(PropertyDefiner): "name": "forEach", "methodInfo": False, "selfHostedName": "ArrayForEach", - "length": 0, + "length": 1, "condition": PropertyDefiner.getControllingCondition(m, descriptor) })