| 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 24 matching lines...) Expand all Loading... |
| 35 #include "core/dom/custom/CustomElement.h" | 35 #include "core/dom/custom/CustomElement.h" |
| 36 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" | 36 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" |
| 37 #include "core/html/imports/HTMLImportChildClient.h" | 37 #include "core/html/imports/HTMLImportChildClient.h" |
| 38 #include "core/html/imports/HTMLImportLoader.h" | 38 #include "core/html/imports/HTMLImportLoader.h" |
| 39 #include "core/html/imports/HTMLImportsController.h" | 39 #include "core/html/imports/HTMLImportsController.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 HTMLImportChild::HTMLImportChild(Document& master, const KURL& url, SyncMode syn
c) | 43 HTMLImportChild::HTMLImportChild(Document& master, const KURL& url, SyncMode syn
c) |
| 44 : HTMLImport(sync) | 44 : HTMLImport(sync) |
| 45 #if ENABLE(OILPAN) |
| 46 , m_master(&master) |
| 47 #else |
| 45 , m_master(master) | 48 , m_master(master) |
| 49 #endif |
| 46 , m_url(url) | 50 , m_url(url) |
| 47 , m_customElementMicrotaskStep(0) | 51 , m_customElementMicrotaskStep(0) |
| 48 , m_loader(0) | 52 , m_loader(0) |
| 49 , m_client(0) | 53 , m_client(0) |
| 50 { | 54 { |
| 55 #if !ENABLE(OILPAN) |
| 51 m_master.guardRef(); | 56 m_master.guardRef(); |
| 57 #endif |
| 52 } | 58 } |
| 53 | 59 |
| 54 HTMLImportChild::~HTMLImportChild() | 60 HTMLImportChild::~HTMLImportChild() |
| 55 { | 61 { |
| 56 // importDestroyed() should be called before the destruction. | 62 // importDestroyed() should be called before the destruction. |
| 57 ASSERT(!m_loader); | 63 ASSERT(!m_loader); |
| 58 | 64 |
| 59 if (m_customElementMicrotaskStep) { | 65 if (m_customElementMicrotaskStep) { |
| 60 // if Custom Elements were blocked, must unblock them before death | 66 // if Custom Elements were blocked, must unblock them before death |
| 61 m_customElementMicrotaskStep->importDidFinish(); | 67 m_customElementMicrotaskStep->importDidFinish(); |
| 62 m_customElementMicrotaskStep = 0; | 68 m_customElementMicrotaskStep = 0; |
| 63 } | 69 } |
| 64 | 70 |
| 65 if (m_client) | 71 if (m_client) |
| 66 m_client->importChildWasDestroyed(this); | 72 m_client->importChildWasDestroyed(this); |
| 67 | 73 |
| 74 #if !ENABLE(OILPAN) |
| 68 m_master.guardDeref(); | 75 m_master.guardDeref(); |
| 76 #endif |
| 69 } | 77 } |
| 70 | 78 |
| 71 void HTMLImportChild::wasAlreadyLoaded() | 79 void HTMLImportChild::wasAlreadyLoaded() |
| 72 { | 80 { |
| 73 ASSERT(!m_loader); | 81 ASSERT(!m_loader); |
| 74 ASSERT(m_client); | 82 ASSERT(m_client); |
| 75 stateWillChange(); | 83 stateWillChange(); |
| 76 } | 84 } |
| 77 | 85 |
| 78 void HTMLImportChild::startLoading(const ResourcePtr<RawResource>& resource) | 86 void HTMLImportChild::startLoading(const ResourcePtr<RawResource>& resource) |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 HTMLImport::showThis(); | 239 HTMLImport::showThis(); |
| 232 fprintf(stderr, " loader=%p own=%s async=%s url=%s", | 240 fprintf(stderr, " loader=%p own=%s async=%s url=%s", |
| 233 m_loader, | 241 m_loader, |
| 234 hasLoader() && ownsLoader() ? "Y" : "N", | 242 hasLoader() && ownsLoader() ? "Y" : "N", |
| 235 isSync() ? "Y" : "N", | 243 isSync() ? "Y" : "N", |
| 236 url().string().utf8().data()); | 244 url().string().utf8().data()); |
| 237 } | 245 } |
| 238 #endif | 246 #endif |
| 239 | 247 |
| 240 } // namespace WebCore | 248 } // namespace WebCore |
| OLD | NEW |