Closed Bug 1406961 Opened 7 years ago Closed 6 years ago

Console throws for WrappedNative

Categories

(DevTools :: Console, defect, P3)

58 Branch
defect

Tracking

(firefox-esr52 unaffected, firefox57 unaffected, firefox58 fixed, firefox59 fixed)

RESOLVED FIXED
Firefox 59
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- fixed
firefox59 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

(Keywords: regression)

In bug 1394559 I removed a try statement around getOwnPropertyNames according to Jim said:

> I think that means leaving the `try` out, because a throw here will cause
> mochitests to fail and alert us to the problem. If we keep the `try` with
> the empty `catch`, that's a silent failure, which is not helpful.

But Cu.Sandbox throws and is not covered by tests:

  Object.getOwnPropertyNames(Cu.Sandbox)
  // [Exception... "Cannot modify properties of a WrappedNative"  nsresult: "0x80570034 (NS_ERROR_XPC_CANT_MODIFY_PROP_ON_WN)"  location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1"  data: no]

Should I add the try statement back, or should I add some check for these WrappedNative objects? Does Debugger.Object expose some way to check this?
Flags: needinfo?(jimb)
Priority: -- → P3
Fixed in bug 1403536 by adding back the try statement.
Assignee: nobody → oriol-bugzilla
Status: NEW → RESOLVED
Closed: 6 years ago
Depends on: 1403536
Flags: needinfo?(jimb)
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.