Index: src/v8natives.js |
diff --git a/src/v8natives.js b/src/v8natives.js |
index 18e56c38ef5ada19a43fa4ef0da68530cc0deeaf..6eb13719638a9359fb30e3361e660b990e2fc8cb 100644 |
--- a/src/v8natives.js |
+++ b/src/v8natives.js |
@@ -1105,7 +1105,7 @@ function FunctionBind(this_arg) { // Length is 1. |
throw new $TypeError('Bind must be called on a function'); |
} |
// this_arg is not an argument that should be bound. |
- var argc_bound = %_ArgumentsLength() - 1; |
+ var argc_bound = (%_ArgumentsLength() || 1) - 1; |
if (argc_bound > 0) { |
var bound_args = new $Array(argc_bound); |
for(var i = 0; i < argc_bound; i++) { |