| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 return; | 982 return; |
| 983 | 983 |
| 984 if (!end_was_delayed_ || ShouldDelayEnd()) | 984 if (!end_was_delayed_ || ShouldDelayEnd()) |
| 985 return; | 985 return; |
| 986 | 986 |
| 987 end_was_delayed_ = false; | 987 end_was_delayed_ = false; |
| 988 PrepareToStopParsing(); | 988 PrepareToStopParsing(); |
| 989 } | 989 } |
| 990 | 990 |
| 991 void HTMLDocumentParser::Finish() { | 991 void HTMLDocumentParser::Finish() { |
| 992 // FIXME: We should ASSERT(!m_parserStopped) here, since it does not makes | 992 // FIXME: We should DCHECK(!m_parserStopped) here, since it does not makes |
| 993 // sense to call any methods on DocumentParser once it's been stopped. | 993 // sense to call any methods on DocumentParser once it's been stopped. |
| 994 // However, FrameLoader::stop calls DocumentParser::finish unconditionally. | 994 // However, FrameLoader::stop calls DocumentParser::finish unconditionally. |
| 995 | 995 |
| 996 Flush(); | 996 Flush(); |
| 997 if (IsDetached()) | 997 if (IsDetached()) |
| 998 return; | 998 return; |
| 999 | 999 |
| 1000 // Empty documents never got an append() call, and thus have never started a | 1000 // Empty documents never got an append() call, and thus have never started a |
| 1001 // background parser. In those cases, we ignore shouldUseThreading() and fall | 1001 // background parser. In those cases, we ignore shouldUseThreading() and fall |
| 1002 // through to the non-threading case. | 1002 // through to the non-threading case. |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1340 success_histogram.Count(duration); | 1340 success_histogram.Count(duration); |
| 1341 } else { | 1341 } else { |
| 1342 DEFINE_STATIC_LOCAL( | 1342 DEFINE_STATIC_LOCAL( |
| 1343 CustomCountHistogram, failure_histogram, | 1343 CustomCountHistogram, failure_histogram, |
| 1344 ("PreloadScanner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); | 1344 ("PreloadScanner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); |
| 1345 failure_histogram.Count(duration); | 1345 failure_histogram.Count(duration); |
| 1346 } | 1346 } |
| 1347 } | 1347 } |
| 1348 | 1348 |
| 1349 } // namespace blink | 1349 } // namespace blink |
| OLD | NEW |