[webkit-reviews] review denied: [Bug 48123] Do not initialize to undefined variables with an initializer : [Attachment 71550] initundefined.diff
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 23 12:16:07 PDT 2010
Oliver Hunt <oliver at apple.com> has denied Xan Lopez <xan.lopez at gmail.com>'s
request for review:
Bug 48123: Do not initialize to undefined variables with an initializer
https://bugs.webkit.org/show_bug.cgi?id=48123
Attachment 71550: initundefined.diff
https://bugs.webkit.org/attachment.cgi?id=71550&action=review
------- Additional Comments from Oliver Hunt <oliver at apple.com>
This isn't actually safe, as you need control flow analysis to know whether the
variable will be accessed prior to initialisation:
<script>
alert(x);
var x = 5;
</script>
x is used prior to be defined but it is not initialised until later. You also
can't hoist the initialiser as it may depend on prior computation, eg.
y=10;
var x=y;
etc.
More information about the webkit-reviews
mailing list