Skip to content

GetStackString should only add the newline if frameString is non-empty #46

@erights

Description

@erights

GetStackString contains

  1. Let stackString be the concatenation of errorString, the code unit 0x000A (LINE FEED), and frameString.

This is fine in the normal case where frameString is non-empty. But that's up to the host. For security, a host may well decide to omit all stack frame info, which it is allowed to do under this spec. Since this case has no precedent, we are free to define this case to have pleasant behavior.

"non-empty" is not the right corrective if we leave the current spec text as is, because the empty-ish case would actually have frameString be a space. We could fix that by making "only a space" be a condition around adding this newline, but better would be to refactor the spec that frameString, if non-empty, contained an initial newline.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions