Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b0bb30bdd41d8dc58b6d988d26f3141cc0446651
      
https://github.com/WebKit/WebKit/commit/b0bb30bdd41d8dc58b6d988d26f3141cc0446651
  Author: Devin Rousso <[email protected]>
  Date:   2026-10-09 (Fri, 09 Oct 2026)

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

  Log Message:
  -----------
  Web Inspector: don't automatically invoke native getters on functions and 
prototype objects
https://bugs.webkit.org/show_bug.cgi?id=320626

Reviewed by Timothy Hatcher.

`Runtime.getDisplayableProperties` automatically invokes native getters so 
object previews can show their values.

Keep this behavior for instances, but leave native getters on functions and 
prototype objects as accessors since restricted function accessors and DOM 
accessors without an instance receiver throw.

If a native getter rejects an object that otherwise looks like a valid 
receiver, preserve its accessor descriptor instead of exposing the exception as 
its value.

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

* LayoutTests/inspector/runtime/getDisplayableProperties.html:
* LayoutTests/inspector/runtime/getDisplayableProperties-expected.txt:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to