Web Inspector: console.log fires getters for deep properties
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Aug 2018 02:43:47 +0000 (02:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 11 Aug 2018 02:43:47 +0000 (02:43 +0000)
commit510c0954e91c5cf80f730c35ada914120cae8222
treea0bafdfeae18591b955c6e39d8a306b349847f22
parenta045716cbd1b3f0040c0ff546fc3b04f67b6193a
Web Inspector: console.log fires getters for deep properties
https://bugs.webkit.org/show_bug.cgi?id=187542
<rdar://problem/42873158>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-08-10
Reviewed by Saam Barati.

Source/JavaScriptCore:

* inspector/InjectedScriptSource.js:
(RemoteObject.prototype._isPreviewableObject):
Avoid getters/setters when checking for simple properties to preview.
Here we avoid invoking `object[property]` if it could be a user getter.

LayoutTests:

* inspector/injected-script/avoid-getter-invocation-expected.txt: Added.
* inspector/injected-script/avoid-getter-invocation.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234780 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/inspector/injected-script/avoid-getter-invocation-expected.txt [new file with mode: 0644]
LayoutTests/inspector/injected-script/avoid-getter-invocation.html [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/InjectedScriptSource.js