Make With objects non-native

NEW
Unassigned

Status

()

Core
JavaScript Engine
8 years ago
4 years ago

People

(Reporter: jorendorff, Unassigned)

Tracking

Other Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
I was shocked to discover today that With objects are native. Even mrbkap was surprised.

As with XML objects (see bug 560101 comment 8), With objects have a shape but do not support the shape guarantees. Fortunately they aren't exposed to scripts, and while they're on the scope chain the property cache and JIT are disabled. So no known correctness bug here, just general outrage.
With objects are so old there wasn't any notion of "non-native" -- no JSObjectOps, no LiveConnect, none of that.

But yeah: outrageous!

/be

Comment 2

8 years ago
Brendan, if we make with non-native we will have non-native objects on the scope chain. What gives?
What a predicament! Srsly, we could either make With non-native but tolerate it as a special case, or leave it native and do something stronger to defend against it being shapeless -- or could we keep it native and give it its proto's shape?

/be
Jason, aren't With objects empty in shape terms? Each with its own proto, the empty shape for a given With object must depend on proto identity.

/be

Comment 5

8 years ago
With objects never have any own properties, so I don't think it hurts if they are non-native.
(Assignee)

Updated

4 years ago
Assignee: general → nobody
You need to log in before you can comment on or make changes to this bug.