Skip to content

Commit

Permalink
Bug 956857 - Fix busted semantics for subject parameter in "xpcom-cat…
Browse files Browse the repository at this point in the history
…egory-entry-removed" notification. r=bsmedberg
  • Loading branch information
Projjol committed Jan 29, 2014
1 parent bb14671 commit c779a76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion xpcom/components/nsCategoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ nsCategoryManager::AddCategoryEntry(const char *aCategoryName,
if (NS_SUCCEEDED(rv)) {
if (oldEntry) {
NotifyObservers(NS_XPCOM_CATEGORY_ENTRY_REMOVED_OBSERVER_ID,
aCategoryName, oldEntry);
aCategoryName, aEntryName);
}
NotifyObservers(NS_XPCOM_CATEGORY_ENTRY_ADDED_OBSERVER_ID,
aCategoryName, aEntryName);
Expand Down
5 changes: 3 additions & 2 deletions xpcom/tests/unit/test_bug374754.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ var removedTopic = "xpcom-category-entry-removed";
var testCategory = "bug-test-category";
var testEntry = "@mozilla.org/bug-test-entry;1";

var testValue= "check validity";
var result = "";
var expected = "add remove add remove ";
var timer;
Expand Down Expand Up @@ -49,8 +50,8 @@ function run_test() {
observerService.addObserver(observer, removedTopic, false);

var categoryManager = Cc["@mozilla.org/categorymanager;1"].getService(Ci.nsICategoryManager);
categoryManager.addCategoryEntry(testCategory, testEntry, testEntry, false, true);
categoryManager.addCategoryEntry(testCategory, testEntry, testEntry, false, true);
categoryManager.addCategoryEntry(testCategory, testEntry, testValue, false, true);
categoryManager.addCategoryEntry(testCategory, testEntry, testValue, false, true);
categoryManager.deleteCategoryEntry(testCategory, testEntry, false);

timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
Expand Down

0 comments on commit c779a76

Please sign in to comment.