Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Unified Diff: src/array.js

Issue 6606002: Merge revision 6500-6600 from bleeding_edge to the isolates branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/virtual-frame-arm.cc ('k') | src/assembler.h » ('j') | src/ast.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
===================================================================
--- src/array.js (revision 7030)
+++ src/array.js (working copy)
@@ -171,8 +171,9 @@
}
return %StringBuilderConcat(elements, length2, '');
} finally {
- // Make sure to pop the visited array no matter what happens.
- if (is_array) visited_arrays.pop();
+ // Make sure to remove the last element of the visited array no
+ // matter what happens.
+ if (is_array) visited_arrays.length = visited_arrays.length - 1;
}
}
@@ -603,16 +604,17 @@
}
// SpiderMonkey, TraceMonkey and JSC treat the case where no delete count is
- // given differently from when an undefined delete count is given.
+ // given as a request to delete all the elements from the start.
+ // And it differs from the case of undefined delete count.
// This does not follow ECMA-262, but we do the same for
// compatibility.
var del_count = 0;
- if (num_arguments > 1) {
+ if (num_arguments == 1) {
+ del_count = len - start_i;
+ } else {
del_count = TO_INTEGER(delete_count);
if (del_count < 0) del_count = 0;
if (del_count > len - start_i) del_count = len - start_i;
- } else {
- del_count = len - start_i;
}
var deleted_elements = [];
« no previous file with comments | « src/arm/virtual-frame-arm.cc ('k') | src/assembler.h » ('j') | src/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698