diff options
author | Andreas Kling <kling@serenityos.org> | 2021-02-23 20:42:32 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-23 20:56:54 +0100 |
commit | 5d180d1f996ead27f9c5cb3db7f91e293de34d9d (patch) | |
tree | e881854dac5d749518562970d6194a0ef65736ec /Userland/DevTools/Inspector | |
parent | b33a6a443e700cd80325d312f21c985b0687bb97 (diff) | |
download | serenity-5d180d1f996ead27f9c5cb3db7f91e293de34d9d.zip |
Everywhere: Rename ASSERT => VERIFY
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
Diffstat (limited to 'Userland/DevTools/Inspector')
-rw-r--r-- | Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp | 4 | ||||
-rw-r--r-- | Userland/DevTools/Inspector/RemoteObjectPropertyModel.cpp | 2 | ||||
-rw-r--r-- | Userland/DevTools/Inspector/RemoteProcess.cpp | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp b/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp index 32caac30ec..cc1aed8013 100644 --- a/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp +++ b/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp @@ -72,7 +72,7 @@ GUI::ModelIndex RemoteObjectGraphModel::parent_index(const GUI::ModelIndex& inde if (&m_process.roots()[row] == remote_object.parent) return create_index(row, 0, remote_object.parent); } - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); return {}; } @@ -81,7 +81,7 @@ GUI::ModelIndex RemoteObjectGraphModel::parent_index(const GUI::ModelIndex& inde return create_index(row, 0, remote_object.parent); } - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); return {}; } diff --git a/Userland/DevTools/Inspector/RemoteObjectPropertyModel.cpp b/Userland/DevTools/Inspector/RemoteObjectPropertyModel.cpp index 6c9e82f3a7..a01b3bf502 100644 --- a/Userland/DevTools/Inspector/RemoteObjectPropertyModel.cpp +++ b/Userland/DevTools/Inspector/RemoteObjectPropertyModel.cpp @@ -61,7 +61,7 @@ String RemoteObjectPropertyModel::column_name(int column) const case Column::Value: return "Value"; } - ASSERT_NOT_REACHED(); + VERIFY_NOT_REACHED(); } GUI::Variant RemoteObjectPropertyModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const diff --git a/Userland/DevTools/Inspector/RemoteProcess.cpp b/Userland/DevTools/Inspector/RemoteProcess.cpp index da3fd14a0d..c2670d09dc 100644 --- a/Userland/DevTools/Inspector/RemoteProcess.cpp +++ b/Userland/DevTools/Inspector/RemoteProcess.cpp @@ -52,7 +52,7 @@ RemoteProcess::RemoteProcess(pid_t pid) void RemoteProcess::handle_identify_response(const JsonObject& response) { int pid = response.get("pid").to_int(); - ASSERT(pid == m_pid); + VERIFY(pid == m_pid); m_process_name = response.get("process_name").as_string_or({}); @@ -70,7 +70,7 @@ void RemoteProcess::handle_get_all_objects_response(const JsonObject& response) HashMap<FlatPtr, RemoteObject*> objects_by_address; for (auto& value : object_array.values()) { - ASSERT(value.is_object()); + VERIFY(value.is_object()); auto& object = value.as_object(); auto remote_object = make<RemoteObject>(); remote_object->address = object.get("address").to_number<FlatPtr>(); @@ -169,12 +169,12 @@ void RemoteProcess::update() remaining_bytes -= packet.size(); } - ASSERT(data.size() == length); + VERIFY(data.size() == length); dbgln("Got data size {} and read that many bytes", length); auto json_value = JsonValue::from_string(data); - ASSERT(json_value.has_value()); - ASSERT(json_value.value().is_object()); + VERIFY(json_value.has_value()); + VERIFY(json_value.value().is_object()); dbgln("Got JSON response {}", json_value.value()); |