The (Unofficial) Blog-style Changelog for the V8 JavaScript Engine

V8 release v13.6

Stable date:

Tags:javascript

Features (3)

Update ProgressEvent to use double type for 'loaded' and 'total'

Category: JavaScript

The ProgressEvent has attributes `loaded` and `total` indicating the progress, and their type is `unsigned long long` now. With this feature, the type for these two attributes is changed to `double` instead, which gives the developer more control over the value. For example, the developers can now create a ProgressEvent with the `total` of 1 and the `loaded` increasing from 0 to 1 gradually. This is aligned with the default behavior of the <progress> HTML element if the max attribute is omitted.

JSON data
{
  "category": "JavaScript",
  "flag_name": null,
  "id": 5067669587623936,
  "milestone": 136,
  "name": "Update ProgressEvent to use double type for 'loaded' and 'total'",
  "summary": "The ProgressEvent has attributes `loaded` and `total` indicating the progress, and their type is `unsigned long long` now.\r\n\r\nWith this feature, the type for these two attributes is changed to `double` instead, which gives the developer more control over the value. For example, the developers can now create a ProgressEvent with the `total` of 1 and the `loaded` increasing from 0 to 1 gradually. This is aligned with the default behavior of the <progress> HTML element if the max attribute is omitted. "
}
RegExp.escape

Category: JavaScript Flag name: --js-regexp-escape

RegExp.escape is a static method that takes a string and returns an escaped version that may be used as a pattern inside a regular expression. For example, copied from the proposal explainer: ``` const str = prompt("Please enter a string"); const escaped = RegExp.escape(str); const re = new RegExp(escaped, 'g'); // handles reg exp special tokens with the replacement. console.log(ourLongText.replace(re)); ```

JSON data
{
  "category": "JavaScript",
  "flag_name": "--js-regexp-escape",
  "id": 5179154657705984,
  "milestone": 136,
  "name": "RegExp.escape",
  "summary": "RegExp.escape is a static method that takes a string and returns an escaped version that may be used as a pattern inside a regular expression.\r\n\r\nFor example, copied from the proposal explainer:\r\n\r\n```\r\nconst str = prompt(\"Please enter a string\");\r\nconst escaped = RegExp.escape(str);\r\nconst re = new RegExp(escaped, 'g'); // handles reg exp special tokens with the replacement.\r\nconsole.log(ourLongText.replace(re));\r\n```"
}
Explicit Compile Hints with Magic Comments

Category: JavaScript

Allow attaching information about which functions should be eager parsed & compiled in JavaScript files. The information will be encoded as magic comments. We'll first target launching the file-based explicit compile hints, and as a follow up, investigate selecting individual functions for eager compilation.

JSON data
{
  "category": "JavaScript",
  "flag_name": "",
  "id": 5100466238652416,
  "milestone": null,
  "name": "Explicit Compile Hints with Magic Comments",
  "summary": "Allow attaching information about which functions should be eager parsed & compiled in JavaScript files.\n\nThe information will be encoded as magic comments.\n\nWe'll first target launching the file-based explicit compile hints, and as a follow up, investigate selecting individual functions for eager compilation."
}

V8 release v13.7

Stable date:

Tags:javascriptwebassembly

Features (3)

Align error type thrown for 'payment' WebAuthn credential creation: SecurityError => NotAllowedError

Category: JavaScript

Correct the error type thrown during WebAuthn credential creation for 'payment' credentials. Due to a historic specification mismatch, creating a 'payment' credential in a cross-origin iframe without a user activation would throw a SecurityError instead of a NotAllowedError, which is what is thrown for non-payment credentials. This is a breaking change, albeit a niche one. Code that previously detected the type of error thrown (e.g., `e instanceof SecurityError`) would be affected. Code that just generally handles errors during credential creation (e.g. `catch (e)`) will continue to function correctly.

JSON data
{
  "category": "JavaScript",
  "flag_name": null,
  "id": 5160752715137024,
  "milestone": 137,
  "name": "Align error type thrown for 'payment' WebAuthn credential creation: SecurityError => NotAllowedError",
  "summary": "Correct the error type thrown during WebAuthn credential creation for 'payment' credentials. Due to a historic specification mismatch, creating a 'payment' credential in a cross-origin iframe without a user activation would throw a SecurityError instead of a NotAllowedError, which is what is thrown for non-payment credentials.\r\n\r\nThis is a breaking change, albeit a niche one. Code that previously detected the type of error thrown (e.g., `e instanceof SecurityError`) would be affected. Code that just generally handles errors during credential creation (e.g. `catch (e)`) will continue to function correctly."
}
WebAssembly Branch Hints

Category: WebAssembly

Improves the performance of compiled WebAssembly code by informing the engine that a particular branch instruction is very likely to take a specific path. This allows the engine to make better decisions for code layout (improving instruction cache hits) and register allocation. https://github.com/WebAssembly/branch-hinting/blob/main/proposals/branch-hinting/Overview.md

JSON data
{
  "category": "WebAssembly",
  "flag_name": null,
  "id": 5165273114738688,
  "milestone": 137,
  "name": "WebAssembly Branch Hints",
  "summary": "Improves the performance of compiled WebAssembly code by informing the engine that a particular branch instruction is very likely to take a specific path.\n\nThis allows the engine to make better decisions for code layout (improving instruction cache hits) and register allocation.\n\nhttps://github.com/WebAssembly/branch-hinting/blob/main/proposals/branch-hinting/Overview.md"
}
JavaScript Promise Integration

Category: WebAssembly

JavaScript Promise Integration (JSPI) is an API that allows WebAssembly applications to integrate with JavaScript Promises. It allows a WebAssembly program to act as the generator of a Promise, and it allows the WebAssembly program to interact with Promise-bearing APIs. In particular, when an application uses JSPI to call a Promise-bearing (JavaScript) API, the WebAssembly code is suspended; and the original caller to the WebAssembly program is given a Promise that will be fulfilled when the WebAssembly program finally completes. JSPI is described in more detail in https://github.com/WebAssembly/js-promise-integration which is part of the W3C WebAssembly standards track. See also https://github.com/WebAssembly/stack-switching and https://github.com/WebAssembly/meetings/tree/main/stack.

JSON data
{
  "category": "WebAssembly",
  "flag_name": "enable-experimental-webassembly-stack-switching",
  "id": 5674874568704000,
  "milestone": 137,
  "name": "JavaScript Promise Integration",
  "summary": "JavaScript Promise Integration (JSPI) is an API that allows WebAssembly applications to integrate with JavaScript Promises.\n\nIt allows a WebAssembly program to act as the generator of a Promise, and it allows the WebAssembly program to interact with Promise-bearing APIs.\n\nIn particular, when an application uses JSPI to call a Promise-bearing (JavaScript) API, the WebAssembly code is suspended; and the original caller to the WebAssembly program is given a Promise that will be fulfilled when the WebAssembly program finally completes.\n\nJSPI is described in more detail in https://github.com/WebAssembly/js-promise-integration which is part of the W3C WebAssembly standards track. See  also https://github.com/WebAssembly/stack-switching and https://github.com/WebAssembly/meetings/tree/main/stack."
}

V8 release v13.8

Stable date:

No new features in this version.

More releases...