bool UserScript::operator==(const UserScript &other) const { if (isNull() != other.isNull()) return false; if (isNull()) // neither is valid return true; return worldId() == other.worldId() && runsOnSubFrames() == other.runsOnSubFrames() && injectionPoint() == other.injectionPoint() && name() == other.name() && sourceCode() == other.sourceCode(); }