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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 class ParserDataReceiver final : public RefCountedWillBeGarbageCollectedFinalize
d<ParserDataReceiver>, public ThreadedDataReceiver, public DocumentLifecycleObse
rver { | 86 class ParserDataReceiver final : public RefCountedWillBeGarbageCollectedFinalize
d<ParserDataReceiver>, public ThreadedDataReceiver, public DocumentLifecycleObse
rver { |
87 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ParserDataReceiver); | 87 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(ParserDataReceiver); |
88 public: | 88 public: |
89 static PassRefPtrWillBeRawPtr<ParserDataReceiver> create(WeakPtr<BackgroundH
TMLParser> backgroundParser, Document* document) | 89 static PassRefPtrWillBeRawPtr<ParserDataReceiver> create(WeakPtr<BackgroundH
TMLParser> backgroundParser, Document* document) |
90 { | 90 { |
91 return adoptRefWillBeNoop(new ParserDataReceiver(backgroundParser, docum
ent)); | 91 return adoptRefWillBeNoop(new ParserDataReceiver(backgroundParser, docum
ent)); |
92 } | 92 } |
93 | 93 |
94 #if !ENABLE(OILPAN) | 94 #if !ENABLE(OILPAN) |
95 virtual void ref() override { RefCounted<ParserDataReceiver>::ref(); } | 95 void ref() override { RefCounted<ParserDataReceiver>::ref(); } |
96 virtual void deref() override { RefCounted<ParserDataReceiver>::deref(); } | 96 void deref() override { RefCounted<ParserDataReceiver>::deref(); } |
97 #endif | 97 #endif |
98 | 98 |
99 // ThreadedDataReceiver | 99 // ThreadedDataReceiver |
100 void acceptData(const char* data, int dataLength) override | 100 void acceptData(const char* data, int dataLength) override |
101 { | 101 { |
102 ASSERT(backgroundThread() && backgroundThread()->isCurrentThread()); | 102 ASSERT(backgroundThread() && backgroundThread()->isCurrentThread()); |
103 if (m_backgroundParser.get()) | 103 if (m_backgroundParser.get()) |
104 m_backgroundParser.get()->appendRawBytesFromParserThread(data, dataL
ength); | 104 m_backgroundParser.get()->appendRawBytesFromParserThread(data, dataL
ength); |
105 } | 105 } |
106 | 106 |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1114 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) | 1114 void HTMLDocumentParser::setDecoder(PassOwnPtr<TextResourceDecoder> decoder) |
1115 { | 1115 { |
1116 ASSERT(decoder); | 1116 ASSERT(decoder); |
1117 DecodedDataDocumentParser::setDecoder(decoder); | 1117 DecodedDataDocumentParser::setDecoder(decoder); |
1118 | 1118 |
1119 if (m_haveBackgroundParser) | 1119 if (m_haveBackgroundParser) |
1120 HTMLParserThread::shared()->postTask(threadSafeBind(&BackgroundHTMLParse
r::setDecoder, AllowCrossThreadAccess(m_backgroundParser), takeDecoder())); | 1120 HTMLParserThread::shared()->postTask(threadSafeBind(&BackgroundHTMLParse
r::setDecoder, AllowCrossThreadAccess(m_backgroundParser), takeDecoder())); |
1121 } | 1121 } |
1122 | 1122 |
1123 } | 1123 } |
OLD | NEW |