Consider the following example: --- var text = "PASS"; function a() { var text = "FAIL"; function b() { alert(this.text); } this.c = function() { b(); } b(); } (new a()).c(); --- This code should print PASS twice, but instead prints PASS once and then FAIL. This affects the JavaScriptCore test js1_5/Scope/scope-003.js.
Created attachment 20812 [details] Proposed patch This patch fixes js1_5/Scope/scope-003.js, and it also fixes ecma/String/15.5.4.6-2.js.
Created attachment 20813 [details] Revised proposed patch The ecma/String/15.5.4.6-2.js fix doesn't seem legitimate, so I modified the ChangeLog to reflect this.
(In reply to comment #2) > Created an attachment (id=20813) [edit] > Revised proposed patch SunSpider shows no change for this patch.
Comment on attachment 20813 [details] Revised proposed patch r=me
Committed revision 32536.
Upon further review, this patch really did legitimately fix that test case after all.