mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:18:11 +00:00
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.
This commit is contained in:
parent
b33a6a443e
commit
5d180d1f99
725 changed files with 3448 additions and 3448 deletions
|
@ -227,7 +227,7 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error)
|
|||
ResourceLoader::the().load(
|
||||
error_page_url,
|
||||
[this, failed_url, error](auto data, auto&) {
|
||||
ASSERT(!data.is_null());
|
||||
VERIFY(!data.is_null());
|
||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||
auto html = String::format(
|
||||
String::copy(data).characters(),
|
||||
|
@ -235,12 +235,12 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error)
|
|||
escape_html_entities(error).characters());
|
||||
#pragma GCC diagnostic pop
|
||||
auto document = HTML::parse_html_document(html, failed_url, "utf-8");
|
||||
ASSERT(document);
|
||||
VERIFY(document);
|
||||
frame().set_document(document);
|
||||
},
|
||||
[](auto error) {
|
||||
dbgln("Failed to load error page: {}", error);
|
||||
ASSERT_NOT_REACHED();
|
||||
VERIFY_NOT_REACHED();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ void FrameLoader::resource_did_load()
|
|||
|
||||
if (auto* host_element = frame().host_element()) {
|
||||
// FIXME: Perhaps in the future we'll have a better common base class for <frame> and <iframe>
|
||||
ASSERT(is<HTML::HTMLIFrameElement>(*host_element));
|
||||
VERIFY(is<HTML::HTMLIFrameElement>(*host_element));
|
||||
downcast<HTML::HTMLIFrameElement>(*host_element).content_frame_did_load({});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue