diff --git a/js/xpconnect/src/XPCWrappedNativeInfo.cpp b/js/xpconnect/src/XPCWrappedNativeInfo.cpp index 2209a9f3ac9c..314adb5367e8 100644 --- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp +++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp @@ -442,14 +442,12 @@ XPCNativeSetKey::Hash() const } else { XPCNativeInterface** current = mBaseSet->GetInterfaceArray(); uint16_t count = mBaseSet->GetInterfaceCount(); + for (uint16_t i = 0; i < count; i++) { + h ^= HashPointer(*(current++)); + } + if (mAddition) { - for (uint16_t i = 0; i < count; i++) { - h ^= HashPointer(*(current++)); - } h ^= HashPointer(mAddition); - } else { - for (uint16_t i = 0; i < count; i++) - h ^= HashPointer(*(current++)); } }