test_bug577950.js (591B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 function run_test() { 6 var observer = { 7 QueryInterface: ChromeUtils.generateQI(["nsIObserver"]), 8 9 observe: function observe() { 10 // Don't do anything. 11 }, 12 }; 13 14 /* Set the same pref twice. This shouldn't leak. */ 15 Services.prefs.addObserver("UserPref.nonexistent.setIntPref", observer); 16 Services.prefs.addObserver("UserPref.nonexistent.setIntPref", observer); 17 }