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.
GetStackString contains
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.