Skip to content

Make FunctionWrapper implement SymbolScriptable#1106

Merged
rbri merged 1 commit intoHtmlUnit:masterfrom
duonglaiquang:duong_toStringTag
Mar 18, 2026
Merged

Make FunctionWrapper implement SymbolScriptable#1106
rbri merged 1 commit intoHtmlUnit:masterfrom
duonglaiquang:duong_toStringTag

Conversation

@duonglaiquang
Copy link
Contributor

This PR does the following

Make FunctionWrapper implement SymbolScriptable interface, delegating Symbol operations to the wrapped function.

Problem

Object.prototype.toString.call() on a FunctionWrapper triggers a Symbol.toStringTag lookup via ScriptRuntime.defaultObjectToString(). Since FunctionWrapper did not implement SymbolScriptable, this threw "TypeError: Object function does not support Symbol keys".

@sonarqubecloud
Copy link

@rbri rbri merged commit b78b1ac into HtmlUnit:master Mar 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants