Closed Bug 1122591 Opened 10 years ago Closed 9 years ago

Use new_sandbox=False in all ui and api modules until multiple sandbox support is available

Categories

(Testing :: Firefox UI Tests, defect)

Version 2
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: whimboo, Unassigned)

References

Details

(Whiteboard: [blocked])

As written on bug 1122583 we will have problems with data kept in the global context of a execute_script call. Tests and other modules could reset the sandbox and the formerly set data is lost. Especially registered callbacks for events and observers can leak that way. We should update all of our modules to explicitly always use new_sandbox=False for the time being. We should also ensure to only store those variables on `global` or `this`, which really have to retain state between multiple calls.
Whiteboard: [blocked]
So, I just realized that the implementation sandbox re-use in bug 755036 clobbers the sandbox when switching between windows, which is going to cause this to be incorrect. This was for consistency with the implementation on the content side (and it does that because the current window is used as the prototype for the execution sandbox, as is the case in chrome context). I think we're best off for the moment hanging observer/event state off of testUtils as discussed in 1122583.
ni? just to make sure you see this before spending cycles going down this road. Sorry, I should have thought of this before.
Flags: needinfo?(hskupin)
Yes, observer/event handling is currently on hold. I will implement something similar with the identical API on bug 1123401.
Assignee: hskupin → nobody
Flags: needinfo?(hskupin)
Status: ASSIGNED → NEW
Bug 1149618 actually implemented a way to use multiple sandboxes and retain values between invocations. Means there is no need for this workaround anymore and we can go ahead with the observer implementation.
Status: NEW → RESOLVED
Closed: 9 years ago
Depends on: 1149618
No longer depends on: 1122583
QA Contact: hskupin
Resolution: --- → INVALID
Product: Mozilla QA → Testing
You need to log in before you can comment on or make changes to this bug.