Created
November 10, 2012 23:02
-
-
Save mattrobenolt/4052881 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: src/array.js | |
=================================================================== | |
--- src/array.js (revision 12923) | |
+++ src/array.js (working copy) | |
@@ -1239,8 +1239,8 @@ | |
var accumulator = new InternalArray(length); | |
if (%DebugCallbackSupportsStepping(f)) { | |
for (var i = 0; i < length; i++) { | |
- if (i in array) { | |
- var element = array[i]; | |
+ var element = array[i]; | |
+ if (!IS_UNDEFINED(element)) { | |
// Prepare break slots for debugger step in. | |
%DebugPrepareStepInIfStepping(f); | |
accumulator[i] = %_CallFunction(receiver, element, i, array, f); | |
@@ -1249,8 +1249,8 @@ | |
} else { | |
// This is a duplicate of the previous loop sans debug stepping. | |
for (var i = 0; i < length; i++) { | |
- if (i in array) { | |
- var element = array[i]; | |
+ var element = array[i]; | |
+ if (!IS_UNDEFINED(element)) { | |
accumulator[i] = %_CallFunction(receiver, element, i, array, f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment