diff options
Diffstat (limited to 'deps/v8/src/json/json-parser.cc')
-rw-r--r-- | deps/v8/src/json/json-parser.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/deps/v8/src/json/json-parser.cc b/deps/v8/src/json/json-parser.cc index a85d2af94b..ccea49e89f 100644 --- a/deps/v8/src/json/json-parser.cc +++ b/deps/v8/src/json/json-parser.cc @@ -620,6 +620,11 @@ Handle<Object> JsonParser<Char>::BuildJsonObject( DCHECK_EQ(mutable_double_address, end); } #endif + // Before setting the length of mutable_double_buffer back to zero, we + // must ensure that the sweeper is not running or has already swept the + // object's page. Otherwise the GC can add the contents of + // mutable_double_buffer to the free list. + isolate()->heap()->EnsureSweepingCompleted(); mutable_double_buffer->set_length(0); } } |