Skip to content

Commit a262f09

Browse files
amabluea-maurice
authored andcommitted
Remove asserts from KeepSyncedRegistration.
It is possible for these registrations to receive events, for example, in the case where you do not have permission to access a location in the database, so we should not assert when these functions are called after all. PiperOrigin-RevId: 269678314
1 parent 415178a commit a262f09

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

database/src/desktop/core/keep_synced_event_registration.cc

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// limitations under the License.
1414

1515
#include "database/src/desktop/core/keep_synced_event_registration.h"
16+
1617
#include "app/src/assert.h"
1718
#include "database/src/common/query_spec.h"
1819
#include "database/src/include/firebase/database/common.h"
@@ -39,19 +40,9 @@ Event KeepSyncedEventRegistration::GenerateEvent(const Change& change,
3940
Path());
4041
}
4142

42-
void KeepSyncedEventRegistration::FireEvent(const Event& event) {
43-
(void)event;
44-
FIREBASE_DEV_ASSERT_MESSAGE(
45-
false,
46-
"FireEvent should never be reached on KeepSyncedEventRegistration");
47-
}
43+
void KeepSyncedEventRegistration::FireEvent(const Event& event) { (void)event; }
4844

49-
void KeepSyncedEventRegistration::FireCancelEvent(Error error) {
50-
(void)error;
51-
FIREBASE_DEV_ASSERT_MESSAGE(
52-
false,
53-
"FireCancelEvent should never be reached on KeepSyncedEventRegistration");
54-
}
45+
void KeepSyncedEventRegistration::FireCancelEvent(Error error) { (void)error; }
5546

5647
bool KeepSyncedEventRegistration::MatchesListener(
5748
const void* listener_ptr) const {

0 commit comments

Comments
 (0)