Repository navigation
util: fix inspecting URL subclass prototypes - #66822
Open
HoonDongKang wants to merge 1 commit into
Open
HoonDongKang wants to merge 1 commit into
HoonDongKang wants to merge 1 commit into
Conversation
Check the URL private field brand before accessing href to avoid throwing when inspecting URL subclass prototypes. Assisted-by:Codex:6.1SolHigh Signed-off-by: HoonDongKang <d159123@naver.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66822 +/- ##
==========================================
- Coverage 90.49% 90.49% -0.01%
==========================================
Files 797 797
Lines 277780 277780
Branches 53360 53359 -1
==========================================
- Hits 251388 251367 -21
- Misses 16791 16804 +13
- Partials 9601 9609 +8
🚀 New features to boost your workflow:
|
aduh95
approved these changes
Oct 18, 2026
Collaborator
KhafraDev
approved these changes
Oct 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inspecting a URL subclass prototype throws a
TypeError:isURL()accessedvalue.hrefbefore checkinginstanceof URLand it invokes the getter on this prototype.Use
isURLInstance()to check for URL internal state before readinghref:The check returns
falsefor subclass prototypes without invoking the getter, allowing inspection to continue through the generic object formatting path.Add regression tests for subclass prototypes, class references inspected with
showHidden: true, and%oformatting. Also cover normal subclass instances and an overriddenhrefgetter returningundefinedwithcustomInspect: false.Fixes: #66821
Assisted-by: Codex:6.1-sol-high