Bug 1631358 - make it clearer we don't use CPOWs in pwmgr code, r=jaws
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Tue, 21 Apr 2020 14:05:55 +0000
changeset 588709 934d69727bf4dea3abf99d3fdd1efd8dc38bd46f
parent 588708 dfbc67734d1660af226f374783fda92afbef65fa
child 588710 1e3aec08e4ecf8c37269048a970408b8819fa48a
push id13072
push userffxbld-merge
push dateMon, 04 May 2020 14:22:08 +0000
treeherdermozilla-beta@8a4f45b9a244 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1631358
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1631358 - make it clearer we don't use CPOWs in pwmgr code, r=jaws Differential Revision: https://phabricator.services.mozilla.com/D71512
toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js
toolkit/components/passwordmgr/test/mochitest/pwmgr_common_parent.js
toolkit/components/passwordmgr/test/mochitest/test_onsubmit_value_change.html
toolkit/components/passwordmgr/test/mochitest/test_password_length.html
--- a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js
+++ b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common.js
@@ -157,17 +157,17 @@ function getSubmitMessage(aFilterFn = un
           return;
         }
 
         info("got formSubmissionProcessed");
         PWMGR_COMMON_PARENT.removeMessageListener(
           "formSubmissionProcessed",
           processed
         );
-        resolve(...args);
+        resolve(args[0]);
       }
     );
   });
 }
 
 /**
  * Check for expected username/password in form.
  * @see `checkForm` below for a similar function.
--- a/toolkit/components/passwordmgr/test/mochitest/pwmgr_common_parent.js
+++ b/toolkit/components/passwordmgr/test/mochitest/pwmgr_common_parent.js
@@ -215,15 +215,15 @@ addMessageListener("setMasterPassword", 
     LoginTestUtils.masterPassword.enable();
   } else {
     LoginTestUtils.masterPassword.disable();
   }
 });
 
 LoginManagerParent.setListenerForTests((msg, data) => {
   if (msg == "FormSubmit") {
-    sendAsyncMessage("formSubmissionProcessed", data, {});
+    sendAsyncMessage("formSubmissionProcessed", data);
   }
 });
 
 addMessageListener("cleanup", () => {
   LoginManagerParent.setListenerForTests(null);
 });
--- a/toolkit/components/passwordmgr/test/mochitest/test_onsubmit_value_change.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_onsubmit_value_change.html
@@ -14,17 +14,17 @@ Login Manager test: input value change r
   let chromeScript = runChecksAfterCommonInit();
 
   function getSubmitMessage() {
     info("getSubmitMessage");
     return new Promise((resolve, reject) => {
       chromeScript.addMessageListener("formSubmissionProcessed", function processed(...args) {
         info("got formSubmissionProcessed");
         chromeScript.removeMessageListener("formSubmissionProcessed", processed);
-        resolve(...args);
+        resolve(args[0]);
       });
     });
   }
 </script>
 <p id="display"></p>
 
 <div id="content" style="display: none">
 
--- a/toolkit/components/passwordmgr/test/mochitest/test_password_length.html
+++ b/toolkit/components/passwordmgr/test/mochitest/test_password_length.html
@@ -82,17 +82,17 @@ const TESTCASES = [
 /**
  * @return {Promise} resolving when form submission was processed.
  */
 function getSubmitMessage() {
   return new Promise((resolve, reject) => {
     PWMGR_COMMON_PARENT.addMessageListener("formSubmissionProcessed", function processed(...args) {
       info("got formSubmissionProcessed");
       PWMGR_COMMON_PARENT.removeMessageListener("formSubmissionProcessed", processed);
-      resolve(...args);
+      resolve(args[0]);
     });
   });
 }
 
 add_task(async function test_password_lengths() {
   for (let tc of TESTCASES) {
     info("Starting testcase: " + tc.testName + ", " + JSON.stringify([tc.pword1, tc.pword2]));
     await loadFormIntoIframe(DEFAULT_ORIGIN, `<form id="form1" onsubmit="return false;">