Closed Bug 762790 Opened 12 years ago Closed 6 years ago

setTimeout breaks SpecialPowers.wrap-created (Component-?)wrappers

Categories

(Testing :: Mochitest, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: Gijs, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached file Testcase
(from bug 750638)

It seems that when invoked from a timeout/setinterval, somehow the wrappers aren't quite working correctly (permission denied errors trying to access properties on the wrapped objects).

This testcase probably isn't quite reduced enough, but it's the best I could come up with short-term. Basically, if you apply this and add getComponents to the specialPowersAPI:

getComponents: function() { return this.wrap(Components); },

you'll see the issue on a clean trunk build.
Summary: setTimeout breaks SpecialPowers.wrap → setTimeout breaks SpecialPowers.wrap-created (Component-?)wrappers
So, on a trunk build, the reason for the breakage here is that you're trying to overwrite Components, which silently fails (because Components is permanent). If you replace your use of |Components| with |wrappedComponents| or something, it seems to work.

Is that the only issue here, or is there something else?
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: