Closed Bug 576644 Opened 11 years ago Closed 11 years ago
ES5 primitive this with strict-mode-code functions
ES5 section 10.4.3 says: 1. If the function code is strict code, set the ThisBinding to thisArg. 2. Else if thisArg is null or undefined, set the ThisBinding to the global object. 3. Else if Type(thisArg) is not Object, set the ThisBinding to ToObject(thisArg). 4. Else set the ThisBinding to thisArg. Lines 2-4 are how ES3 behaves. Line 1 is new.
This is a dup of bug 514568, which Jim filed based on Annex C -- I'll let you guys dup one way or another. /be
I don't think this is a duplicate of bug 514568. That bug is about eval in strict mode. This one is about primitive `this`.
(In reply to comment #2) > I don't think this is a duplicate of bug 514568. That bug is about eval in > strict mode. This one is about primitive `this`. Argh, I had the wrong bug # in my pastebuffer. I meant bug 514570. You can see it in the "Show dependency tree" listing pretty clearly, although it does not say "primitive" (it does mention "this"; "Pronoun trouble!" - D. Duck). /be
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: strictThis
You need to log in before you can comment on or make changes to this bug.