Bug 1565515 - Added TODO comments on duplicated code r=asuth,ttung
authorSimon Giesecke <sgiesecke@mozilla.com>
Tue, 30 Jul 2019 14:49:52 +0000
changeset 485324 ec828d3716ba20695fd5c8eae4531ba4dd88764c
parent 485323 4dff1d5830293faf9577644bb0253c93e5cc43df
child 485325 0b1108acd8133a9b5c353359e0cd461556f97806
push id36364
push userdvarga@mozilla.com
push dateTue, 30 Jul 2019 21:50:30 +0000
treeherdermozilla-central@e259d43073bc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, ttung
bugs1565515
milestone70.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 1565515 - Added TODO comments on duplicated code r=asuth,ttung Differential Revision: https://phabricator.services.mozilla.com/D37852
dom/indexedDB/test/helpers.js
dom/indexedDB/test/unit/xpcshell-head-parent-process.js
--- a/dom/indexedDB/test/helpers.js
+++ b/dom/indexedDB/test/helpers.js
@@ -480,16 +480,18 @@ function workerScript() {
       if (this._preventDefault) {
         _event_.preventDefault();
         _event_.stopPropagation();
       }
       grabEventAndContinueHandler(_event_);
     },
   };
 
+  // TODO this is duplicate from the global compareKeys function defined above,
+  // this duplication should be avoided (bug 1565986)
   self.compareKeys = function(_k1_, _k2_) {
     let t = typeof _k1_;
     if (t != typeof _k2_) {
       return false;
     }
 
     if (t !== "object") {
       return _k1_ === _k2_;
--- a/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
+++ b/dom/indexedDB/test/unit/xpcshell-head-parent-process.js
@@ -145,16 +145,19 @@ ExpectError.prototype = {
     grabEventAndContinueHandler(event);
   },
 };
 
 function continueToNextStepSync() {
   testGenerator.next();
 }
 
+// TODO compareKeys is duplicated in ../helpers.js, can we import that here?
+// the same applies to many other functions in this file
+// this duplication should be avoided (bug 1565986)
 function compareKeys(k1, k2) {
   let t = typeof k1;
   if (t != typeof k2) {
     return false;
   }
 
   if (t !== "object") {
     return k1 === k2;