diff options
Diffstat (limited to 'WebCore/html/PreloadScanner.cpp')
-rw-r--r-- | WebCore/html/PreloadScanner.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/html/PreloadScanner.cpp b/WebCore/html/PreloadScanner.cpp index 7e95c65..782e9bd 100644 --- a/WebCore/html/PreloadScanner.cpp +++ b/WebCore/html/PreloadScanner.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2008 Apple Inc. All Rights Reserved. + * Copyright (C) 2009 Torch Mobile, Inc. http://www.torchmobile.com/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -43,7 +44,7 @@ #include <wtf/CurrentTime.h> #include <wtf/unicode/Unicode.h> -#ifdef __GNUC__ +#if COMPILER(GCC) // The main tokenizer includes this too so we are getting two copies of the data. However, this way the code gets inlined. #include "HTMLEntityNames.c" #else @@ -128,9 +129,13 @@ bool PreloadScanner::scanningBody() const void PreloadScanner::write(const SegmentedString& source) { +#if PRELOAD_DEBUG double startTime = currentTime(); +#endif tokenize(source); +#if PRELOAD_DEBUG m_timeUsed += currentTime() - startTime; +#endif } static inline bool isWhitespace(UChar c) |