[webkit-changes] [WebKit/WebKit] d1f120: Gracefully handle OOM while trying to describing a...

Commit Queue noreply at github.com
Sun Dec 3 23:31:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d1f1209a4e20008b342f8d4451b44429b75587b0
      https://github.com/WebKit/WebKit/commit/d1f1209a4e20008b342f8d4451b44429b75587b0
  Author: Mark Lam <mark.lam at apple.com>
  Date:   2023-12-03 (Sun, 03 Dec 2023)

  Changed paths:
    A JSTests/stress/out-of-memory-while-describing-symbol-for-error.js
    M Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
    M Source/JavaScriptCore/runtime/Symbol.cpp
    M Source/JavaScriptCore/runtime/Symbol.h

  Log Message:
  -----------
  Gracefully handle OOM while trying to describing a Symbol when creating an Error.
https://bugs.webkit.org/show_bug.cgi?id=265775
rdar://119046215

Reviewed by Yusuke Suzuki.

If trying to describe a Symbol via stringifying it results in an OutOfMemoryError,
just simply describe is as a generic "Symbol" instead.

* JSTests/stress/out-of-memory-while-describing-symbol-for-error.js: Added.
(catch):
* Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:
(JSC::errorDescriptionForValue):
* Source/JavaScriptCore/runtime/Symbol.cpp:
(JSC::Symbol::tryGetDescriptiveString const):
* Source/JavaScriptCore/runtime/Symbol.h:

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




More information about the webkit-changes mailing list