[webkit-reviews] review requested: [Bug 27203] Inspector: Remove Unintended Global Variables : [Attachment 32644] Remove Unintended Globals

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 12 21:40:20 PDT 2009


Joseph Pecoraro <joepeck02 at gmail.com> has asked  for review:
Bug 27203: Inspector: Remove Unintended Global Variables
https://bugs.webkit.org/show_bug.cgi?id=27203

Attachment 32644: Remove Unintended Globals
https://bugs.webkit.org/attachment.cgi?id=32644&action=review

------- Additional Comments from Joseph Pecoraro <joepeck02 at gmail.com>
This removes the unintended globals that I found.

Most are harmless and are only global variables inside the Web Inspector
window.

Note that in the case of Console.js, there is code that gets evaluated in the
inspected window.  Thus the "k" variable could get overwritten when running
either the keys() or values() functions created by the Web Inspector.  For
example, running some sample code in the Inspector:

> k
ReferenceError: Can't find variable: k
> var obj = { a:1 }
undefined
> keys(obj)
["a"]
> k /* Now defined as a side effect of running keys() */
a

Although its probably bad programming if a developer used window.k, and even
more unusual if they then called these functions, this side effect should still
be removed. =)

Cheers.


More information about the webkit-reviews mailing list