Skip to content

Commit 99bf73c

Browse files
author
beidson
committed
Reviewed by Tim Hatcher
Changed some debugging-only code to be more platform independent * WebCore.xcodeproj/project.pbxproj: * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::pruneUnretainedIconsOnStartup): (WebCore::IconDatabase::syncDatabase): Canonical link: https://commits.webkit.org/13437@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 89bc185 commit 99bf73c

2 files changed

Lines changed: 22 additions & 15 deletions

File tree

WebCore/ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2006-08-25 Brady Eidson <beidson@apple.com>
2+
3+
Reviewed by Tim Hatcher
4+
5+
Changed some debugging-only code to be more platform independent
6+
7+
* WebCore.xcodeproj/project.pbxproj:
8+
* loader/icon/IconDatabase.cpp:
9+
(WebCore::IconDatabase::pruneUnretainedIconsOnStartup):
10+
(WebCore::IconDatabase::syncDatabase):
11+
112
2006-08-25 Nikolas Zimmermann <zimmermann@kde.org>
213

314
Reviewed/landed by Adam.

WebCore/loader/icon/IconDatabase.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,9 @@
3030
#include "Image.h"
3131
#include "Logging.h"
3232
#include "PlatformString.h"
33-
#include <errno.h>
34-
#include <sys/stat.h>
35-
#include <sys/types.h>
36-
#include <time.h>
3733
#include "SQLStatement.h"
3834
#include "SQLTransaction.h"
39-
35+
#include "SystemTime.h"
4036

4137
// FIXME - One optimization to be made when this is no longer in flux is to make query construction smarter - that is queries that are created from
4238
// multiple strings and numbers should be handled differently than with String + String + String + etc.
@@ -646,7 +642,7 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
646642
ASSERT(!m_initialPruningComplete);
647643

648644
#ifndef NDEBUG
649-
CFTimeInterval start = CFAbsoluteTimeGetCurrent();
645+
double timestamp = currentTime();
650646
#endif
651647

652648
// rdar://4690949 - Need to prune unretained iconURLs here, then prune out all pageURLs that reference
@@ -690,11 +686,11 @@ void IconDatabase::pruneUnretainedIconsOnStartup(Timer<IconDatabase>*)
690686
m_initialPruningComplete = true;
691687

692688
#ifndef NDEBUG
693-
CFTimeInterval duration = CFAbsoluteTimeGetCurrent() - start;
694-
if (duration <= 1.0)
695-
LOG(IconDatabase, "Pruning unretained icons took %.4f seconds", duration);
689+
timestamp = currentTime() - timestamp;
690+
if (timestamp <= 1.0)
691+
LOG(IconDatabase, "Pruning unretained icons took %.4f seconds", timestamp);
696692
else
697-
LOG(IconDatabase, "Pruning unretained icons took %.4f seconds - this is much too long!", duration);
693+
LOG(IconDatabase, "Pruning unretained icons took %.4f seconds - this is much too long!", timestamp);
698694
#endif
699695
}
700696

@@ -706,7 +702,7 @@ void IconDatabase::updateDatabase(Timer<IconDatabase>*)
706702
void IconDatabase::syncDatabase()
707703
{
708704
#ifndef NDEBUG
709-
CFTimeInterval start = CFAbsoluteTimeGetCurrent();
705+
double timestamp = currentTime();
710706
#endif
711707

712708
// First we'll do the pending additions
@@ -751,11 +747,11 @@ void IconDatabase::syncDatabase()
751747
m_updateTimer.stop();
752748

753749
#ifndef NDEBUG
754-
CFTimeInterval duration = CFAbsoluteTimeGetCurrent() - start;
755-
if (duration <= 1.0)
756-
LOG(IconDatabase, "Updating the database took %.4f seconds", duration);
750+
timestamp = currentTime() - timestamp;
751+
if (timestamp <= 1.0)
752+
LOG(IconDatabase, "Updating the database took %.4f seconds", timestamp);
757753
else
758-
LOG(IconDatabase, "Updating the database took %.4f seconds - this is much too long!", duration);
754+
LOG(IconDatabase, "Updating the database took %.4f seconds - this is much too long!", timestamp);
759755
#endif
760756
}
761757

0 commit comments

Comments
 (0)