Bug 930091 - Clone marionette args into the sandbox rather than using a COW. r=mdas

The current setup causes the arguments object (which is modified from the
sandbox) to be a COW, which causes problems with our new restrictions on
COWs. According to jgriffin, these are should be JSON-serializable, so
the clone should be fine.
This commit is contained in:
Bobby Holley 2014-07-20 15:36:31 -06:00
Родитель eeed6749e0
Коммит 6728b23884
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -514,8 +514,8 @@ function executeScript(msg, directInject) {
}
else {
try {
sandbox.__marionetteParams = elementManager.convertWrappedArguments(
msg.json.args, curFrame);
sandbox.__marionetteParams = Cu.cloneInto(elementManager.convertWrappedArguments(
msg.json.args, curFrame), sandbox, { wrapReflectors: true });
}
catch(e) {
sendError(e.message, e.code, e.stack, asyncTestCommandId);
@ -646,8 +646,8 @@ function executeWithCallback(msg, useFinish) {
}
else {
try {
sandbox.__marionetteParams = elementManager.convertWrappedArguments(
msg.json.args, curFrame);
sandbox.__marionetteParams = Cu.cloneInto(elementManager.convertWrappedArguments(
msg.json.args, curFrame), sandbox, { wrapReflectors: true });
}
catch(e) {
sendError(e.message, e.code, e.stack, asyncTestCommandId);