Closed Bug 751783 Opened 10 years ago Closed 10 years ago
Save globals between execute
_script calls in the 'content' context
Currently, each call to execute_script or execute_async_script uses a new sandbox, so the sandbox globals are not carried over, and the only way to share state between calls is to use a property on the window object. This contaminates the page's JS context, and makes it a little more work to write tests. We should preserve globals between calls, so that this isn't necessary.
Assignee: nobody → philipp
Attachment #621828 - Flags: review?(jgriffin)
Patch looks good to me! We just need to make sure it doesn't break any of the tests
Added the newSandbox argument to execute* calls to preserve functionality with Selenium, and updated the tests.
Comment on attachment 622449 [details] [diff] [review] Part 1 (v2): Reuse the content sandbox Looks good, and tests pass! Let's land it and then we can update the chrome code in a separate patch.
Attachment #622449 - Flags: review?(jgriffin) → review+
Target Milestone: --- → mozilla15
(In reply to Jonathan Griffin (:jgriffin) from comment #4) > Looks good, and tests pass! Let's land it and then we can update the chrome > code in a separate patch. Let's do it in a separate bug. I'm not a big fan of lingering half-landed bugs. Filed bug 755036.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Summary: Save globals between execute_script calls → Save globals between execute_script calls in the 'content' context
You need to log in before you can comment on or make changes to this bug.