Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix incorrect assumption about young/old space allocation in

JSON stringify (introduced in r5951).
Review URL:

git-svn-id: ce2b1a6d-e550-0410-aec6-3dcde31c8c00
  • Loading branch information...
commit 9977abb42ae9bce6089e3a4e717cc6f8d73e7155 1 parent b50b984 authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/
7 src/
@@ -4689,6 +4689,13 @@ static MaybeObject* QuoteJsonString(Vector<const Char> characters) {
if (!new_alloc->ToObject(&new_object)) {
return new_alloc;
+ if (!Heap::new_space()->Contains(new_object)) {
+ // Even if our string is small enough to fit in new space we still have to
+ // handle it being allocated in old space as may happen in the third
+ // attempt. See CALL_AND_RETRY in heap-inl.h and similar code in
+ // CEntryStub::GenerateCore.
+ return SlowQuoteJsonString<Char, StringType>(characters);
+ }
StringType* new_string = StringType::cast(new_object);
Please sign in to comment.
Something went wrong with that request. Please try again.