Mutex supports explicit arguments to 'claim' and 'checkExclusive'
authorGregg Lind <glind@mozilla.com>
Sun, 01 Dec 2013 13:14:45 -0600
changeset 1023 61962dd78abcb428261783313335f275dc739c80
parent 1022 d6bd25b610da8b1c08ae88c6544f8f7e5e1d347e
child 1024 13d309ec5dd1ae1cc3d63c9afdadda036895cd0b
push id854
push userglind@mozilla.com
push dateSun, 01 Dec 2013 19:14:57 +0000
Mutex supports explicit arguments to 'claim' and 'checkExclusive'
testcases/base_classes.jar
testcases/index.json
testcases/study_base_classes.js
index c8d73b6e12b82850baa02c1996c82aa6daf1069a..5425fe01c3492c0011e610acd261db1822915124
GIT binary patch
literal 7424
zc${^aWl$VilZIz-*TLN-gS)%COMpPo0fKuVxDyyWIKeGgkRU+^C%8Mo83@58$lklP
zyLInYecjd7b?Wrn?>WC8Z8bzB5CHA3q=1CV0sax_03?8hg1!ugil!ph^C$p-2+&qT
zMf>{-;eST7|Dzc6SN)$@Lq=0YQ9)0iQ$z7mV|+|qje~O<TaAN#Vtn$eF83VY)}9Ba
zss>m^W7@k43H{R%87wD@-9eZbv|GaNx6cHJTzH&&0RP)PSV?$D{IA{O|8ie*__sUJ
zU*+lLZR7vut(B+k8*67PPfuG<PDjsEaVOVR<&@2*SE5Kh94x$heuD2&$0l;E#mKBL
ze~U~^U=#Eg4rjp76&&yDYtSDz>!_a?*~GrKqMk&fb6dxr)YjJe8W^c<aKty(_Eo>(
zoN$@ge6#*o&y@(<@KbB&(v%7exW2)%5O@84=jZMJ{EXeXMC1A{%gEJ+bBzDlL{l@a
zGs7Pnu}p({5t58+iPve?GkY0mdJ^OMT6XTT31b^sGPL0tdcN><2VB~21Rob!a50U`
zTk@I2^P1)<dS40t=*ICwr&Bc%vgK^S&E&#m(Ajm*7<`iy=4esF>3_F1cGKdwZ$-G!
zST#xL*ZySt-k!2^joJ9_3F#od4ZOF_8o+ietFIfU%m`^7FKT8jqaWoBVOB7+$x3j_
zib2Z2CsxdkZ>q&J=iwL~z-yr%@N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rIS)6d4>~P`oG`GaVcI;<Ca1W10&O`_>
zQlu|v7Xp<TkYs9@9S#WRd4FM<^j;~-Mro9Jzk@v>MCjAPbrhL;r@O(|CLzH4WQ8KV
z&+$3aQ{L>eNkgf3;o(Kj!}l7q1QAJ^`f+SeKT+2gG<P#TQ<Bu5zQeam5-#1O({?>t
zWaReEOa1Lqi2w@eu}ls=A$oN<%Wo~F4?;+45Z4xwLi`FVZ|2XQh<C;(1=Xb~=Ur!z
z6kXs-{&ZCoT}%rjoT_<C_e{Ml;P*_{0-3Y<MAMVX5u~)=I5Lu6{T;@+e3;2>e9H36
zfV>Or**#x0;Rg=}{*Bv?bCM>&6aYY;>EE~whyVio8~6P$2>hEB{yY9f4*$ROpA--D
rFPX%D;D-O)@Hg%I=fjBpwV~rbu|I7!WR$-L5dX@azdAeR->3fqg$lVP
--- a/testcases/index.json
+++ b/testcases/index.json
@@ -70,17 +70,17 @@
       "thumbnail": "https://testpilot.mozillalabs.com/testcases/pilot-survey-thumbnail.png",
       "name": "How Do You Feel About Your Firefox Browser",
       "summary": "The aim of this survey is to understand users' perception on their Firefox browser in general over time. We will follow up a similar survey in a month to understand the change of user perception."
     }
   ],
   "new_experiments": [
     {
       "default": {
-        "hash": "88374a5e53dc9376bc17960f766728236f97b827eb37502c3efcbf5a9ede887d",
+        "hash": "c2fea1669f36ca3af16a8e19027c6944ca45a988ce9351dc8c368aa0c85e69ad",
         "name": "Dependencies",
         "jarfile": "base_classes.jar"
       }
     },
     {
       "default": {
         "studyfile": "search-test-phase-1.js",
         "hash": "b1557c012758002f84b0b2cad75953816a014736b3431bf38f16c77a283c0349",
--- a/testcases/study_base_classes.js
+++ b/testcases/study_base_classes.js
@@ -626,36 +626,38 @@ const PREF_CURRENTSTUDY = "extensions.te
 exports.CurrentStudyMutex = function(testId) {
   this._testId = testId;
 };
 
 exports.CurrentStudyMutex.prototype = {
   /**
    * Returns true if there's another study
    */
-  checkConflicted: function() {
+  checkConflicted: function(name) {
+    if (name === undefined) name = this._testId;
     try {
       let currentStudy = Services.prefs.getCharPref(PREF_CURRENTSTUDY);
 
       // No current study
       if (currentStudy == "") {
         return false;
       }
 
       // Conflicted if the current study is different
-      return currentStudy != this._testId;
+      return currentStudy != name;
     }
     catch(ex) {
       // Must be an empty pref, so no current study
       return false;
     }
   },
 
-  claimExclusive: function() {
-    Services.prefs.setCharPref(PREF_CURRENTSTUDY, this._testId);
+  claimExclusive: function(name) {
+    if (name === undefined) name = this._testId;
+    Services.prefs.setCharPref(PREF_CURRENTSTUDY, name);
   },
 };
 
 exports.extend = function(subClass, baseClass) {
   //http://www.kevlindev.com/tutorials/javascript/inheritance/index.htm
   function inheritance() {}
   inheritance.prototype = baseClass.prototype;