| Index: LayoutTests/crypto/resources/common.js
|
| diff --git a/LayoutTests/crypto/resources/common.js b/LayoutTests/crypto/resources/common.js
|
| index 8169e9be66654a7a8200edeb3168499318d6b15b..afcfe11510130903b3d2c45c22c9e9ad4e36399b 100644
|
| --- a/LayoutTests/crypto/resources/common.js
|
| +++ b/LayoutTests/crypto/resources/common.js
|
| @@ -69,12 +69,18 @@ function failAndFinishJSTest(error)
|
| finishJSTest();
|
| }
|
|
|
| -// Returns a Promise for the cloned key.
|
| +// FIXME: Delete this and use cloneObject() directly.
|
| function cloneKey(key)
|
| {
|
| + return cloneObject(key);
|
| +}
|
| +
|
| +// Returns a Promise for the cloned object.
|
| +function cloneObject(obj)
|
| +{
|
| // Sending an object through a MessagePort implicitly clones it.
|
| // Use a single MessageChannel so requests complete in FIFO order.
|
| - var self = cloneKey;
|
| + var self = cloneObject;
|
| if (!self.channel) {
|
| self.channel = new MessageChannel();
|
| self.callbacks = [];
|
| @@ -87,7 +93,7 @@ function cloneKey(key)
|
|
|
| return new Promise(function(resolve, reject) {
|
| self.callbacks.push(resolve);
|
| - self.channel.port2.postMessage(key);
|
| + self.channel.port2.postMessage(obj);
|
| });
|
| }
|
|
|
|
|