Double allocation size for special json strings on every resize (fixes
authorricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 26 May 2011 14:03:30 +0000 (14:03 +0000)
committerricow@chromium.org <ricow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 26 May 2011 14:03:30 +0000 (14:03 +0000)
commit3f8a1917258c265d1cdb84a382636787fc674983
tree03dfcb633f5266fe6a4d87f1ec52c167d29f4b9d
parent331e6102e615f5454f362b76ebe1fb1cc8e3ce6b
Double allocation size for special json strings on every resize (fixes
crbug 83877)

The issue was that with the relatively small start and increment size of the string we created a ton of string handles when scanning a large string with special characters (500k+ in this case).

In addition, since we can not be sure the the newly allocated string
is in newspace a check is introduced and if not a filler object is
inserted instead of shrinking.
Review URL: http://codereview.chromium.org/7075009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/json-parser.cc
src/json-parser.h