If a unit of global code doesn't define any functions, the associated CodeBlock does not have needsFullScopeChain set. Since we use this to test for copying local variables to temporaries when necessary, it leads to incorrect behaviour. I will post a test case in the next post.
Created attachment 21653 [details] Test case
Created attachment 21657 [details] Patch to fix symptoms Here is a patch that fixes the symptoms, but we should still try to more clearly define the meaning of needsFullScopeChain.
Comment on attachment 21657 [details] Patch to fix symptoms r=me
Landed in r34510.