Skip to content

Revert removal of codeString from HostEnsureCanCompileStrings #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2024

Conversation

lukewarlow
Copy link
Contributor

The reason for removal was based on a misunderstanding of the status quo (See tc39/ecma262#3294 (comment)).

I think this is okay to add back to the proposal document before we officially tell Tc39 in June?

@lukewarlow lukewarlow force-pushed the revert-removal-of-code-string branch from b291785 to 3bc677e Compare May 7, 2024 11:21
@lukewarlow lukewarlow requested a review from nicolo-ribaudo May 7, 2024 11:22
@lukewarlow lukewarlow force-pushed the revert-removal-of-code-string branch from 3bc677e to 488b6fd Compare May 7, 2024 11:22
@lukewarlow
Copy link
Contributor Author

@nicolo-ribaudo or @koto could you merge this please?

@koto koto merged commit af881cb into tc39:master May 7, 2024
@lukewarlow lukewarlow deleted the revert-removal-of-code-string branch May 7, 2024 20:29
@nicolo-ribaudo
Copy link
Member

Summary of the update

In the 2024-04 TC39 meeting we decided to not expose the built string to the host, under the assumption that that string was spec-internal only. Our recommendation was that instead the host should re-concatenate the string pieces to build its own representation of the string.

It turns out however that the concatenated string was already exposed to users, through new Function(...).toString() which (differently from most Function.prototype.toString behaviors, is not implementation-defined). This PR thus re-exposed the concatenated string to the host to be used as-is.

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.

3 participants