| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 if (!m_customElementMicrotaskStep) | 134 if (!m_customElementMicrotaskStep) |
| 135 return; | 135 return; |
| 136 m_customElementMicrotaskStep->invalidate(); | 136 m_customElementMicrotaskStep->invalidate(); |
| 137 m_customElementMicrotaskStep.clear(); | 137 m_customElementMicrotaskStep.clear(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded() | 140 void HTMLImportChild::createCustomElementMicrotaskStepIfNeeded() |
| 141 { | 141 { |
| 142 ASSERT(!m_customElementMicrotaskStep); | 142 ASSERT(!m_customElementMicrotaskStep); |
| 143 | 143 |
| 144 if (!isDone() && !formsCycle()) { | 144 if (!hasFinishedLoading() && !formsCycle()) { |
| 145 #if ENABLE(OILPAN) | 145 #if ENABLE(OILPAN) |
| 146 m_customElementMicrotaskStep = CustomElement::didCreateImport(this); | 146 m_customElementMicrotaskStep = CustomElement::didCreateImport(this); |
| 147 #else | 147 #else |
| 148 m_customElementMicrotaskStep = CustomElement::didCreateImport(this)->wea
kPtr(); | 148 m_customElementMicrotaskStep = CustomElement::didCreateImport(this)->wea
kPtr(); |
| 149 #endif | 149 #endif |
| 150 } | 150 } |
| 151 } | 151 } |
| 152 | 152 |
| 153 bool HTMLImportChild::isDone() const | 153 bool HTMLImportChild::hasFinishedLoading() const |
| 154 { | 154 { |
| 155 ASSERT(m_loader); | 155 ASSERT(m_loader); |
| 156 | 156 |
| 157 return m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_cus
tomElementMicrotaskStep; | 157 return m_loader->isDone() && m_loader->microtaskQueue()->isEmpty() && !m_cus
tomElementMicrotaskStep; |
| 158 } | 158 } |
| 159 | 159 |
| 160 HTMLImportLoader* HTMLImportChild::loader() const | 160 HTMLImportLoader* HTMLImportChild::loader() const |
| 161 { | 161 { |
| 162 // This should never be called after dispose(). | 162 // This should never be called after dispose(). |
| 163 ASSERT(m_loader); | 163 ASSERT(m_loader); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 DEFINE_TRACE(HTMLImportChild) | 222 DEFINE_TRACE(HTMLImportChild) |
| 223 { | 223 { |
| 224 visitor->trace(m_customElementMicrotaskStep); | 224 visitor->trace(m_customElementMicrotaskStep); |
| 225 visitor->trace(m_loader); | 225 visitor->trace(m_loader); |
| 226 visitor->trace(m_client); | 226 visitor->trace(m_client); |
| 227 HTMLImport::trace(visitor); | 227 HTMLImport::trace(visitor); |
| 228 } | 228 } |
| 229 | 229 |
| 230 } // namespace blink | 230 } // namespace blink |
| OLD | NEW |