v8/test/mjsunit/json-parse-slice.js
Toon Verwaest fd42f40b2c [json] Specialize json parser on chartype rather than bool seq_one_byte
Change-Id: I34dc911d205ab507f668bfd422eb1838f660a6bf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1571624
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60964}
2019-04-24 08:44:17 +00:00

7 lines
291 B
JavaScript

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var s = 'abcabcabcabcabc["possibly a sliced string"]'.slice(15)
assertEquals(["possibly a sliced string"], JSON.parse(s));