| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 class RawDataDocumentParser : public DocumentParser { | 33 class RawDataDocumentParser : public DocumentParser { |
| 34 protected: | 34 protected: |
| 35 RawDataDocumentParser(Document* document) | 35 RawDataDocumentParser(Document* document) |
| 36 : DocumentParser(document) | 36 : DocumentParser(document) |
| 37 { | 37 { |
| 38 } | 38 } |
| 39 | 39 |
| 40 virtual void finish() | 40 virtual void finish() |
| 41 { | 41 { |
| 42 if (!isStopped()) | 42 if (!m_parserStopped && !isDetached()) |
| 43 document()->finishedParsing(); | 43 document()->finishedParsing(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 virtual void insert(const SegmentedString&) | 47 virtual void insert(const SegmentedString&) |
| 48 { | 48 { |
| 49 // <https://bugs.webkit.org/show_bug.cgi?id=25397>: JS code can always c
all document.write, we need to handle it. | 49 // <https://bugs.webkit.org/show_bug.cgi?id=25397>: JS code can always c
all document.write, we need to handle it. |
| 50 ASSERT_NOT_REACHED(); | 50 ASSERT_NOT_REACHED(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 virtual void append(const SegmentedString&) | 53 virtual void append(const SegmentedString&) |
| 54 { | 54 { |
| 55 ASSERT_NOT_REACHED(); | 55 ASSERT_NOT_REACHED(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual bool finishWasCalled() | 58 virtual bool finishWasCalled() |
| 59 { | 59 { |
| 60 // finish() always calls document()->finishedParsing() so we will be | 60 // finish() always calls document()->finishedParsing() so we will be |
| 61 // deleted after finish(). | 61 // deleted after finish(). |
| 62 return false; | 62 return false; |
| 63 } | 63 } |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 #endif // RawDataDocumentParser_h | 68 #endif // RawDataDocumentParser_h |
| OLD | NEW |