Bug 19510 - CodeBlock::needsFullScopeChain not always set for global code
Summary: CodeBlock::needsFullScopeChain not always set for global code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-11 22:38 PDT by Cameron Zwarich (cpst)
Modified: 2008-06-22 17:59 PDT (History)
3 users (show)

See Also:


Attachments
Test case (180 bytes, text/html)
2008-06-11 22:39 PDT, Cameron Zwarich (cpst)
no flags Details
Patch to fix symptoms (5.71 KB, patch)
2008-06-12 01:57 PDT, Cameron Zwarich (cpst)
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Zwarich (cpst) 2008-06-11 22:38:04 PDT
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.
Comment 1 Cameron Zwarich (cpst) 2008-06-11 22:39:06 PDT
Created attachment 21653 [details]
Test case
Comment 2 Cameron Zwarich (cpst) 2008-06-12 01:57:59 PDT
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 3 Maciej Stachowiak 2008-06-12 01:59:26 PDT
Comment on attachment 21657 [details]
Patch to fix symptoms

r=me
Comment 4 Cameron Zwarich (cpst) 2008-06-12 02:05:35 PDT
Landed in r34510.