Open Bug 871171 Opened 12 years ago Updated 2 years ago

[jsdbg2] Debugger.Object.prototype.getOwnPropertyDescriptor should not throw when applied to wrapped native prototypes

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: jimb, Unassigned)

References

(Blocks 1 open bug)

Details

It's a known bug that D.O.p.getOwnPropertyDescriptor might throw when applied to proxies, but it's also the case that it throws when inspecting the prototype chains of wrapped natives. This means that almost every use of D.O.p.getOwnPropertyDescriptor in the debugger has to be wrapped in a little try/catch clause with a comment about bug 560072. It's kind of wacky that a function whose job is to inspect properties is unable to inspect properties. For Object.getOwnPropertyDescriptor, there's a public spec that it can't comply with, so for that function to throw makes sense, but the debugger is supposed to help us handle these cases. We can make up variant descriptor types to handle ugly reality. Naturally, this doesn't address the proxy issue; that's a separate problem.
Assignee: nobody → general
Component: Developer Tools: Debugger → JavaScript Engine
Product: Firefox → Core
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.