[webkit-changes] [WebKit/WebKit] 0e85ec: [JSC] TypeError message for missing "throw" method...

Commit Queue noreply at github.com
Tue Oct 10 22:07:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0e85ec0665a3e717ec93223a9329fd1d97f5e98e
      https://github.com/WebKit/WebKit/commit/0e85ec0665a3e717ec93223a9329fd1d97f5e98e
  Author: Alexey Shvayka <ashvayka at apple.com>
  Date:   2023-10-10 (Tue, 10 Oct 2023)

  Changed paths:
    M JSTests/stress/async-iteration-yield-star-interface.js
    M JSTests/stress/generator-yield-star.js
    M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

  Log Message:
  -----------
  [JSC] TypeError message for missing "throw" method during yield* delegation is misleading
https://bugs.webkit.org/show_bug.cgi?id=262988
<rdar://problem/116777453>

Reviewed by Yusuke Suzuki.

This change rewords the TypeError message to avoid mentioning "generator" since all generators have
the "throw" method (unless in a super unlikely case of it being removed) and fixes grammar by using
a proper noun for "delegated".

Aligns JSC with V8 and SpiderMonkey to mention "iterator".

* JSTests/stress/async-iteration-yield-star-interface.js:
* JSTests/stress/generator-yield-star.js:
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDelegateYield):

Canonical link: https://commits.webkit.org/269189@main




More information about the webkit-changes mailing list