archives

« Bugzilla Issues Index

#1929 — 19.2.3.5, Function.prototype.toString(): missing "not"?


19.2.3.5, Function.prototype.toString(), 2nd paragraph, last sentence:

"If the source code string does meet these criteria then it must be a string for which eval will throw a SyntaxError exception."

Change "will throw" to "will not throw" or "does meet" to "does not meet"? The latter restriction is more strict.


I believe that the intent is what the current text says: if the stated criteria can not be met then trying to eval that toString text should produce a syntax error.

MarkM should know


I think "these criteria" are malformed, as it doesn't state any requirement on how the original function was expressed, only on which production it is rendered as. But even once these are brought into sync, then André is correct. The text should read "does not meet".

As currently written, the text is self contradictory anyway, as the function source cannot both preserve the original functionality when evaluated and throw a Syntax error when evaluated.


fixed in rev25 editor's draft


in rev25