OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Apple 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 29 matching lines...) Expand all Loading... | |
40 : m_owner(owner) | 40 : m_owner(owner) |
41 , m_asyncEventQueue(GenericEventQueue::create(this)) | 41 , m_asyncEventQueue(GenericEventQueue::create(this)) |
42 { | 42 { |
43 ScriptWrappable::init(this); | 43 ScriptWrappable::init(this); |
44 } | 44 } |
45 | 45 |
46 TextTrackList::~TextTrackList() | 46 TextTrackList::~TextTrackList() |
47 { | 47 { |
48 #if !ENABLE(OILPAN) | 48 #if !ENABLE(OILPAN) |
49 ASSERT(!m_owner); | 49 ASSERT(!m_owner); |
50 #endif | 50 |
51 // TextTrackList and m_asyncEventQueue always become unreachable | |
52 // together. So TextTrackList and m_asyncEventQueue are destructed in the | |
53 // same GC. We don't need to close it explicitly in Oilpan. | |
51 m_asyncEventQueue->close(); | 54 m_asyncEventQueue->close(); |
haraken
2014/06/12 10:48:51
In non-oilpan builds, some destructors call close(
tkent
2014/06/12 23:50:12
I'd like to keep non-oilpan code.
| |
52 #if !ENABLE(OILPAN) | 55 |
53 for (unsigned i = 0; i < length(); ++i) { | 56 for (unsigned i = 0; i < length(); ++i) { |
54 item(i)->setTrackList(0); | 57 item(i)->setTrackList(0); |
55 } | 58 } |
56 #endif | 59 #endif |
57 } | 60 } |
58 | 61 |
59 unsigned TextTrackList::length() const | 62 unsigned TextTrackList::length() const |
60 { | 63 { |
61 return m_addTrackTracks.size() + m_elementTracks.size() + m_inbandTracks.siz e(); | 64 return m_addTrackTracks.size() + m_elementTracks.size() + m_inbandTracks.siz e(); |
62 } | 65 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
327 } | 330 } |
328 | 331 |
329 HTMLMediaElement* TextTrackList::owner() const | 332 HTMLMediaElement* TextTrackList::owner() const |
330 { | 333 { |
331 return m_owner; | 334 return m_owner; |
332 } | 335 } |
333 | 336 |
334 void TextTrackList::trace(Visitor* visitor) | 337 void TextTrackList::trace(Visitor* visitor) |
335 { | 338 { |
336 visitor->trace(m_owner); | 339 visitor->trace(m_owner); |
340 visitor->trace(m_asyncEventQueue); | |
337 visitor->trace(m_addTrackTracks); | 341 visitor->trace(m_addTrackTracks); |
338 visitor->trace(m_elementTracks); | 342 visitor->trace(m_elementTracks); |
339 visitor->trace(m_inbandTracks); | 343 visitor->trace(m_inbandTracks); |
340 EventTargetWithInlineData::trace(visitor); | 344 EventTargetWithInlineData::trace(visitor); |
341 } | 345 } |
OLD | NEW |