Wednesday, November 25, 2015

V8 Release 4.8

Roughly every six weeks, we create a new branch of V8 as part of our release process. Each version is branched from V8’s git master immediately before Chrome branches for a Chrome Beta milestone. Today we’re pleased to announce our newest branch, V8 version 4.8, which will be in beta until it is released in coordination with Chrome 48 Stable. V8 4.8 contains a handful of developer-facing features, so we’d like to give you a preview of some of the highlights in anticipation of the release in several weeks.

Improved ECMAScript 2015 (ES6) support

This release of V8 provides support for two well-known symbols, built-in symbols from the ES2015 spec that allow developers to leverage several low-level language constructs which were previously hidden.


The name for a Boolean valued property that if true indicates an object should be flattened to its array elements by Array.prototype.concat.

"use strict";
class AutomaticallySpreadingArray extends Array {
   get [Symbol.isConcatSpreadable]() {
      return true;
let first = [1];
let second = new AutomaticallySpreadingArray();
second[0] = 2;
second[1] = 3;
let all = first.concat(second);
// Outputs [1, 2, 3]


The name for a method to invoke on an object for implicit conversions to primitive values.

"use strict";
class V8 {
   [Symbol.toPrimitive](hint) {
      if (hint === 'string') {
         return 'V8';
      } else if (hint === 'number') {
         return 8;
      } else {
         console.log('default:' + hint);
         return 8;

let engine = new V8();


The ES2015 spec adjusts the abstract operation for type conversion to convert an argument to an integer suitable for use as the length of an array-like object.  (While not directly observable, this change might be indirectly visible when dealing with array-like objects with negative length.)


Please check out our summary of API changes. This document gets regularly updated a few weeks after each major release.

Developers with an active V8 checkout can use 'git checkout -b 4.8 -t branch-heads/4.8' to experiment with the new features in V8 4.8. Alternatively you can subscribe to Chrome's Beta channel and try the new features out yourself soon.

Posted by the V8 team


  1. Why did you include the ToLength in the post...?
    Is this web exposed?
    What is this supposed to tell the reader...?
    Can you elaborate a bit more within the post than just quoting the specification?

    Also, are the two mentioned symbols the only symbols that were enabled by default (the post says "several" rather than "two" or "a few", so I was wondering)?

    Thank you for the update!

    1. Hi PhistucK Productions,

      ToLength is not directly accessible as a developer, but we adjusted the behavior per the ES2015 spec and it's possible that the effects are seen indirectly--so we included it here for completeness.

      I can adjust the description of the well-known symbols, but they are arcane enough that even with elaboration it's hard to convey much more than the contents of the specification.

      We unshipped @@ToStringTag due to a performance regression ( and didn't update the verbiage in the introduction. Thanks for the catch!

    2. The elaboration part of my comment was referring only to ToLength.
      The symbols were nicely explained! :)

      Thank you for the explanation.

  2. The class example is missing a curly brace here: else if (hint === 'number')