mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 08:15:07 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
7d783d8b84
commit
3f23a58fa1
9 changed files with 97 additions and 70 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <LibGemini/Document.h>
|
||||
#include <LibGfx/ImageDecoder.h>
|
||||
|
@ -39,8 +40,6 @@
|
|||
#include <LibWeb/Page/Frame.h>
|
||||
#include <LibWeb/Page/Page.h>
|
||||
|
||||
//#define GEMINI_DEBUG 1
|
||||
|
||||
namespace Web {
|
||||
|
||||
FrameLoader::FrameLoader(Frame& frame)
|
||||
|
@ -180,14 +179,14 @@ bool FrameLoader::load(const LoadRequest& request, Type type)
|
|||
ResourceLoader::the().load(
|
||||
favicon_url,
|
||||
[this, favicon_url](auto data, auto&) {
|
||||
dbg() << "Favicon downloaded, " << data.size() << " bytes from " << favicon_url;
|
||||
dbgln("Favicon downloaded, {} bytes from {}", data.size(), favicon_url);
|
||||
auto decoder = Gfx::ImageDecoder::create(data.data(), data.size());
|
||||
auto bitmap = decoder->bitmap();
|
||||
if (!bitmap) {
|
||||
dbg() << "Could not decode favicon " << favicon_url;
|
||||
dbgln("Could not decode favicon {}", favicon_url);
|
||||
return;
|
||||
}
|
||||
dbg() << "Decoded favicon, " << bitmap->size();
|
||||
dbgln("Decoded favicon, {}", bitmap->size());
|
||||
if (auto* page = frame().page())
|
||||
page->client().page_did_change_favicon(*bitmap);
|
||||
});
|
||||
|
@ -198,7 +197,7 @@ bool FrameLoader::load(const LoadRequest& request, Type type)
|
|||
|
||||
bool FrameLoader::load(const URL& url, Type type)
|
||||
{
|
||||
dbg() << "FrameLoader::load: " << url;
|
||||
dbgln("FrameLoader::load: {}", url);
|
||||
|
||||
if (!url.is_valid()) {
|
||||
load_error_page(url, "Invalid URL");
|
||||
|
@ -240,7 +239,7 @@ void FrameLoader::load_error_page(const URL& failed_url, const String& error)
|
|||
frame().set_document(document);
|
||||
},
|
||||
[](auto error) {
|
||||
dbg() << "Failed to load error page: " << error;
|
||||
dbgln("Failed to load error page: {}", error);
|
||||
ASSERT_NOT_REACHED();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue