[webkit-changes] [WebKit/WebKit] a7d66e: Web Inspector: only `awaitPromise` for builtin `@P...

Devin Rousso noreply at github.com
Tue Nov 28 17:39:42 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a7d66e60ea7f24d6d2ec35a47bb156c050d107ff
      https://github.com/WebKit/WebKit/commit/a7d66e60ea7f24d6d2ec35a47bb156c050d107ff
  Author: Devin Rousso <hi at devinrousso.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M LayoutTests/inspector/runtime/awaitPromise-expected.txt
    M LayoutTests/inspector/runtime/awaitPromise.html
    M LayoutTests/inspector/runtime/callFunctionOn-awaitPromise-expected.txt
    M LayoutTests/inspector/runtime/callFunctionOn-awaitPromise.html
    M Source/JavaScriptCore/inspector/InjectedScriptSource.js

  Log Message:
  -----------
  Web Inspector: only `awaitPromise` for builtin `@Promise`
https://bugs.webkit.org/show_bug.cgi?id=264920

Reviewed by Patrick Angle.

Otherwise our (unchecked) attempts to `. at then()`/`. at catch()` could result in problems. We also don't really want to support nonstandard behavior (i.e. there's no guarantee that a custom "thenable" will actually have similar/matching behavior to `Promise.prototype.then`).

* Source/JavaScriptCore/inspector/InjectedScriptSource.js:
(InjectedScript.prototype.awaitPromise):
(InjectedScript.prototype.callFunctionOn):
(InjectedScript.prototype._forEachPropertyDescriptor.createFakeValueDescriptor):

* LayoutTests/inspector/runtime/awaitPromise.html:
* LayoutTests/inspector/runtime/awaitPromise-expected.txt:
* LayoutTests/inspector/runtime/callFunctionOn-awaitPromise.html:
* LayoutTests/inspector/runtime/callFunctionOn-awaitPromise-expected.txt:

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




More information about the webkit-changes mailing list