Open Bug 1088657 Opened 10 years ago Updated 2 years ago

Add Debugger API to detect when an object is inaccessible

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: Waldo, Unassigned)

References

(Blocks 1 open bug)

Details

Currently, code that wants to know if it can "use" an object via the Debugger API checks .class != "DeadObject". That works iff the object is a DeadObjectProxy. It doesn't work if the object is a revoked proxy (as created by Proxy.revocable(...) and revoked via the revoke() method on the returned object), because. It also doesn't work with respect to SecurityWrapper instances (which actually leak the class name of the wrapped object, even if all accesses are denied!) that deny attempts to unwrap. We need a generalized way to detect objects on which all operations will fail. The Debugger API half of this is either a method or a getter on DebuggerObject. The JS engine part of this seems like it needs to be a proxy handler method. It needs to recognize DeadObjectProxy, revoked proxies, and SecurityWrappers all, and there's really no unifying theme among them all unless we introduce one.

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: jwalden → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.