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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 HTMLImportLoader* loader = element->document().importLoader(); | 78 HTMLImportLoader* loader = element->document().importLoader(); |
79 OwnPtr<CustomElementMicrotaskResolutionStep> step = CustomElementMicrotaskRe solutionStep::create(context, element, descriptor); | 79 OwnPtr<CustomElementMicrotaskResolutionStep> step = CustomElementMicrotaskRe solutionStep::create(context, element, descriptor); |
80 CustomElementMicrotaskDispatcher::instance().enqueue(loader, step.release()) ; | 80 CustomElementMicrotaskDispatcher::instance().enqueue(loader, step.release()) ; |
81 } | 81 } |
82 | 82 |
83 CustomElementMicrotaskImportStep* CustomElementScheduler::scheduleImport(HTMLImp ortChild* import) | 83 CustomElementMicrotaskImportStep* CustomElementScheduler::scheduleImport(HTMLImp ortChild* import) |
84 { | 84 { |
85 ASSERT(!import->isDone()); | 85 ASSERT(!import->isDone()); |
86 ASSERT(import->parent()); | 86 ASSERT(import->parent()); |
87 | 87 |
88 OwnPtr<CustomElementMicrotaskImportStep> step = CustomElementMicrotaskImport Step::create(import->loader()->microtaskQueue()); | 88 OwnPtr<CustomElementMicrotaskImportStep> step = CustomElementMicrotaskImport Step::create(import->loader()->ensureMicrotaskQueue()); |
dominicc (has gone to gerrit)
2014/04/24 07:28:33
I thought we were always creating microtask queues
| |
89 CustomElementMicrotaskImportStep* rawStep = step.get(); | 89 CustomElementMicrotaskImportStep* rawStep = step.get(); |
90 | 90 |
91 // Ownership of the new step is transferred to the parent | 91 // Ownership of the new step is transferred to the parent |
92 // processing step, or the base queue. | 92 // processing step, or the base queue. |
93 CustomElementMicrotaskDispatcher::instance().enqueue(import->parent()->loade r(), step.release()); | 93 CustomElementMicrotaskDispatcher::instance().enqueue(import->parent()->loade r(), step.release()); |
94 | 94 |
95 return rawStep; | 95 return rawStep; |
96 } | 96 } |
97 | 97 |
98 CustomElementScheduler& CustomElementScheduler::instance() | 98 CustomElementScheduler& CustomElementScheduler::instance() |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 // The processing stack is active. | 145 // The processing stack is active. |
146 CustomElementCallbackDispatcher::instance().enqueue(&callbackQueue); | 146 CustomElementCallbackDispatcher::instance().enqueue(&callbackQueue); |
147 return callbackQueue; | 147 return callbackQueue; |
148 } | 148 } |
149 | 149 |
150 CustomElementMicrotaskDispatcher::instance().enqueue(&callbackQueue); | 150 CustomElementMicrotaskDispatcher::instance().enqueue(&callbackQueue); |
151 return callbackQueue; | 151 return callbackQueue; |
152 } | 152 } |
153 | 153 |
154 } // namespace WebCore | 154 } // namespace WebCore |
OLD | NEW |