| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" | 31 #include "core/dom/custom/CustomElementMicrotaskImportStep.h" |
| 32 | 32 |
| 33 #include "core/dom/custom/CustomElementMicrotaskDispatcher.h" | 33 #include "core/dom/custom/CustomElementMicrotaskDispatcher.h" |
| 34 #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h" | 34 #include "core/dom/custom/CustomElementSyncMicrotaskQueue.h" |
| 35 #include "core/html/imports/HTMLImportChild.h" | 35 #include "core/html/imports/HTMLImportChild.h" |
| 36 #include "core/html/imports/HTMLImportLoader.h" | 36 #include "core/html/imports/HTMLImportLoader.h" |
| 37 #include <stdio.h> | 37 #include <stdio.h> |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 | 40 |
| 41 CustomElementMicrotaskImportStep* CustomElementMicrotaskImportStep::create(HTMLI
mportChild* import) | |
| 42 { | |
| 43 return new CustomElementMicrotaskImportStep(import); | |
| 44 } | |
| 45 | |
| 46 CustomElementMicrotaskImportStep::CustomElementMicrotaskImportStep(HTMLImportChi
ld* import) | 41 CustomElementMicrotaskImportStep::CustomElementMicrotaskImportStep(HTMLImportChi
ld* import) |
| 47 #if ENABLE(OILPAN) | |
| 48 : m_import(import) | 42 : m_import(import) |
| 49 #else | |
| 50 : m_import(import->weakPtr()) | |
| 51 , m_weakFactory(this) | |
| 52 #endif | |
| 53 , m_queue(import->loader()->microtaskQueue()) | 43 , m_queue(import->loader()->microtaskQueue()) |
| 54 { | 44 { |
| 55 } | 45 } |
| 56 | 46 |
| 57 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep() | 47 CustomElementMicrotaskImportStep::~CustomElementMicrotaskImportStep() |
| 58 { | 48 { |
| 59 } | 49 } |
| 60 | 50 |
| 61 void CustomElementMicrotaskImportStep::invalidate() | 51 void CustomElementMicrotaskImportStep::invalidate() |
| 62 { | 52 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 85 |
| 96 #if !defined(NDEBUG) | 86 #if !defined(NDEBUG) |
| 97 void CustomElementMicrotaskImportStep::show(unsigned indent) | 87 void CustomElementMicrotaskImportStep::show(unsigned indent) |
| 98 { | 88 { |
| 99 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa
itForImport(), m_import && m_import->isSync(), m_import ? m_import->url().getStr
ing().utf8().data() : "null"); | 89 fprintf(stderr, "%*sImport(wait=%d sync=%d, url=%s)\n", indent, "", shouldWa
itForImport(), m_import && m_import->isSync(), m_import ? m_import->url().getStr
ing().utf8().data() : "null"); |
| 100 m_queue->show(indent + 1); | 90 m_queue->show(indent + 1); |
| 101 } | 91 } |
| 102 #endif | 92 #endif |
| 103 | 93 |
| 104 } // namespace blink | 94 } // namespace blink |
| OLD | NEW |