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

Unified Diff: src/json-stringifier.h

Issue 11273112: Fix handling arrays with holes in JSON.stringify. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove stray edits Created 8 years, 2 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 | « no previous file | test/mjsunit/json2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/json-stringifier.h
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 070a3ddd538523c1693ec7d43d4ff6b36ecb86d0..2235ed5e8a8c563ba9a57644e44cd86cc7f64a9c 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -413,20 +413,6 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeArray(
}
break;
}
- case FAST_HOLEY_SMI_ELEMENTS: {
- Handle<FixedArray> elements = Handle<FixedArray>(
- FixedArray::cast(object->elements()));
- for (int i = 0; i < length; i++) {
- if (i > 0) Append(',');
- if (elements->is_the_hole(i)) {
- Append("null");
- } else {
- SerializeSmi(Smi::cast(elements->get(i)));
- }
- }
- break;
- }
- case FAST_HOLEY_DOUBLE_ELEMENTS:
case FAST_DOUBLE_ELEMENTS: {
Handle<FixedDoubleArray> elements = Handle<FixedDoubleArray>(
FixedDoubleArray::cast(object->elements()));
@@ -436,7 +422,6 @@ BasicJsonStringifier::Result BasicJsonStringifier::SerializeArray(
}
break;
}
- case FAST_HOLEY_ELEMENTS:
case FAST_ELEMENTS: {
Handle<FixedArray> elements = Handle<FixedArray>(
FixedArray::cast(object->elements()));
« no previous file with comments | « no previous file | test/mjsunit/json2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698