update to track catchguard syntax, r=cls

This commit is contained in:
shaver%netscape.com 1999-11-24 03:36:26 +00:00
Родитель 1e29947595
Коммит 05a56ccb2b
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -59,7 +59,7 @@ function addEntryToRegistry(category, entry, value)
var categorySubtree; var categorySubtree;
try { try {
categorySubtree = registry.getSubtreeRaw(categoriesKey, category); categorySubtree = registry.getSubtreeRaw(categoriesKey, category);
} catch (e : } catch (e if
e instanceof Components.interfaces.nsIXPCException && e instanceof Components.interfaces.nsIXPCException &&
e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) { e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) {
categorySubtree = registry.addSubtreeRaw(categoriesKey, category); categorySubtree = registry.addSubtreeRaw(categoriesKey, category);
@ -90,7 +90,7 @@ function deleteEntryFromRegistry(category, entry)
try { try {
var categorySubtree = registry.getSubtreeRaw(categoriesKey, category); var categorySubtree = registry.getSubtreeRaw(categoriesKey, category);
registry.deleteValue(categorySubtree, entry); registry.deleteValue(categorySubtree, entry);
} catch (e : } catch (e if
e instanceof Components.interfaces.nsIXPCException && e instanceof Components.interfaces.nsIXPCException &&
e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) { e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) {
return false; return false;
@ -112,7 +112,7 @@ proto.deleteCategoryEntry = function (category, entry, persist) {
function deleteCategoryFromRegistry(category) { function deleteCategoryFromRegistry(category) {
try { try {
registry.removeSubtreeRaw(categoriesKey, category); registry.removeSubtreeRaw(categoriesKey, category);
} catch (e : } catch (e if
e instanceof Components.interfaces.nsIXPCException && e instanceof Components.interfaces.nsIXPCException &&
e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) { e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) {
return false; return false;
@ -167,7 +167,7 @@ proto.loadRegistryData = function() {
categoriesKey = categoriesKey =
registry.getSubtree(nsIRegistry.Common, registry.getSubtree(nsIRegistry.Common,
"Software/Mozilla/XPCOM/Categories"); "Software/Mozilla/XPCOM/Categories");
} catch (e : } catch (e if
e instanceof Components.interfaces.nsIXPCException && e instanceof Components.interfaces.nsIXPCException &&
e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) { e.result === 0x80510003 /* XXX NS_ERROR_REG_NOT_FOUND */) {
dump("creating Categories registry point\n"); dump("creating Categories registry point\n");
@ -196,7 +196,7 @@ proto.loadRegistryData = function() {
try { try {
node = en.currentItem(); node = en.currentItem();
node = node.QueryInterface(Components.interfaces.nsIRegistryNode); node = node.QueryInterface(Components.interfaces.nsIRegistryNode);
} catch (e : e instanceof Components.interfaces.nsIXPCException) { } catch (e if e instanceof Components.interfaces.nsIXPCException) {
try { en.next(); } catch (e) { } try { en.next(); } catch (e) { }
continue; continue;
} }
@ -213,7 +213,7 @@ proto.loadRegistryData = function() {
try { try {
entry = catenum.currentItem(); entry = catenum.currentItem();
entry = entry.QueryInterface(Components.interfaces.nsIRegistryValue); entry = entry.QueryInterface(Components.interfaces.nsIRegistryValue);
} catch (e : e instanceof Components.interfaces.nsIXPCException) { } catch (e if e instanceof Components.interfaces.nsIXPCException) {
dump("not a value?\n"); dump("not a value?\n");
try { catenum.next(); } catch (e) { } try { catenum.next(); } catch (e) { }
continue; continue;