| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
| 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
| 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); | 107 context->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMess
ageLevel, message)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 namespace { | 110 namespace { |
| 111 | 111 |
| 112 class ReadableStreamSource : public GarbageCollectedFinalized<ReadableStreamSour
ce>, public UnderlyingSource { | 112 class ReadableStreamSource : public GarbageCollectedFinalized<ReadableStreamSour
ce>, public UnderlyingSource { |
| 113 USING_GARBAGE_COLLECTED_MIXIN(ReadableStreamSource); | 113 USING_GARBAGE_COLLECTED_MIXIN(ReadableStreamSource); |
| 114 public: | 114 public: |
| 115 ReadableStreamSource(XMLHttpRequest* owner) : m_owner(owner) { } | 115 ReadableStreamSource(XMLHttpRequest* owner) : m_owner(owner) { } |
| 116 virtual ~ReadableStreamSource() { } | 116 virtual ~ReadableStreamSource() { } |
| 117 virtual void pullSource() OVERRIDE { } | 117 virtual void pullSource() override { } |
| 118 virtual ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue rea
son) OVERRIDE | 118 virtual ScriptPromise cancelSource(ScriptState* scriptState, ScriptValue rea
son) override |
| 119 { | 119 { |
| 120 m_owner->abort(); | 120 m_owner->abort(); |
| 121 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isola
te())); | 121 return ScriptPromise::cast(scriptState, v8::Undefined(scriptState->isola
te())); |
| 122 } | 122 } |
| 123 virtual void trace(Visitor* visitor) OVERRIDE | 123 virtual void trace(Visitor* visitor) override |
| 124 { | 124 { |
| 125 visitor->trace(m_owner); | 125 visitor->trace(m_owner); |
| 126 UnderlyingSource::trace(visitor); | 126 UnderlyingSource::trace(visitor); |
| 127 } | 127 } |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 // This is RawPtr in non-oilpan build to avoid the reference cycle. To | 130 // This is RawPtr in non-oilpan build to avoid the reference cycle. To |
| 131 // avoid use-after free, the associated ReadableStream must be closed | 131 // avoid use-after free, the associated ReadableStream must be closed |
| 132 // or errored when m_owner is gone. | 132 // or errored when m_owner is gone. |
| 133 RawPtrWillBeMember<XMLHttpRequest> m_owner; | 133 RawPtrWillBeMember<XMLHttpRequest> m_owner; |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 visitor->trace(m_streamSource); | 1658 visitor->trace(m_streamSource); |
| 1659 visitor->trace(m_responseDocument); | 1659 visitor->trace(m_responseDocument); |
| 1660 visitor->trace(m_responseDocumentParser); | 1660 visitor->trace(m_responseDocumentParser); |
| 1661 visitor->trace(m_progressEventThrottle); | 1661 visitor->trace(m_progressEventThrottle); |
| 1662 visitor->trace(m_upload); | 1662 visitor->trace(m_upload); |
| 1663 visitor->trace(m_blobLoader); | 1663 visitor->trace(m_blobLoader); |
| 1664 XMLHttpRequestEventTarget::trace(visitor); | 1664 XMLHttpRequestEventTarget::trace(visitor); |
| 1665 } | 1665 } |
| 1666 | 1666 |
| 1667 } // namespace blink | 1667 } // namespace blink |
| OLD | NEW |