Closed Bug 576644 Opened 14 years ago Closed 14 years ago

ES5 primitive this with strict-mode-code functions

Categories

(Core :: JavaScript Engine, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 514570

People

(Reporter: jorendorff, Unassigned)

References

(Blocks 1 open bug)

Details

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.
Blocks: es5strict
No longer blocks: es5
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: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.