Skip to content

Web Inspector: Console: show boundThis for arrow functions#32043

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dcrousso:eng/277960
Aug 21, 2024
Merged

Web Inspector: Console: show boundThis for arrow functions#32043
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
dcrousso:eng/277960

Conversation

@dcrousso
Copy link
Copy Markdown
Member

@dcrousso dcrousso commented Aug 12, 2024

40f536f

Web Inspector: Console: show `boundThis` for arrow functions
https://bugs.webkit.org/show_bug.cgi?id=277960

Reviewed by Keith Miller.

This will help developers debug issues with `this` similar to `Function.prototype.bind()`.

Note that if `this` isn't used within the body of the arrow function, it's not captured.

* Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):

* LayoutTests/inspector/model/remote-object-get-properties.html:
* LayoutTests/inspector/model/remote-object-get-properties-expected.txt:
* LayoutTests/inspector/runtime/getDisplayableProperties.html:
* LayoutTests/inspector/runtime/getDisplayableProperties-expected.txt:
* LayoutTests/inspector/runtime/getProperties.html:
* LayoutTests/inspector/runtime/getProperties-expected.txt:

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

5856d6f

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 wincairo-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv ✅ 🧪 jsc-armv7-tests
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@dcrousso dcrousso requested a review from patrickangle as a code owner August 12, 2024 17:23
@dcrousso dcrousso self-assigned this Aug 12, 2024
@dcrousso dcrousso added the Web Inspector Bugs related to the WebKit Web Inspector. label Aug 12, 2024
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 12, 2024
@dcrousso dcrousso added request-merge-queue Request a pull request to be added to merge-queue once ready and removed merging-blocked Applied to prevent a change from being merged labels Aug 12, 2024
Copy link
Copy Markdown
Contributor

@kmiller68 kmiller68 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you need an exception check here.

@dcrousso dcrousso added safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks and removed request-merge-queue Request a pull request to be added to merge-queue once ready labels Aug 21, 2024
@Ahmad-S792 Ahmad-S792 added merge-queue Applied to send a pull request to merge-queue and removed safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Aug 21, 2024
https://bugs.webkit.org/show_bug.cgi?id=277960

Reviewed by Keith Miller.

This will help developers debug issues with `this` similar to `Function.prototype.bind()`.

Note that if `this` isn't used within the body of the arrow function, it's not captured.

* Source/JavaScriptCore/inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::getInternalProperties):

* LayoutTests/inspector/model/remote-object-get-properties.html:
* LayoutTests/inspector/model/remote-object-get-properties-expected.txt:
* LayoutTests/inspector/runtime/getDisplayableProperties.html:
* LayoutTests/inspector/runtime/getDisplayableProperties-expected.txt:
* LayoutTests/inspector/runtime/getProperties.html:
* LayoutTests/inspector/runtime/getProperties-expected.txt:

Canonical link: https://commits.webkit.org/282553@main
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 282553@main (40f536f): https://commits.webkit.org/282553@main

Reviewed commits have been landed. Closing PR #32043 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 40f536f into WebKit:main Aug 21, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 21, 2024
@dcrousso dcrousso deleted the eng/277960 branch August 21, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Web Inspector Bugs related to the WebKit Web Inspector.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants