Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "sky/engine/config.h" | 5 #include "sky/engine/config.h" |
| 6 #include "sky/engine/core/html/parser/HTMLScriptRunner.h" | 6 #include "sky/engine/core/html/parser/HTMLScriptRunner.h" |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "sky/engine/core/app/AbstractModule.h" | 9 #include "sky/engine/core/app/AbstractModule.h" |
| 10 #include "sky/engine/core/dom/Document.h" | 10 #include "sky/engine/core/dom/Document.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 108 if (!module) | 108 if (!module) |
| 109 return scriptFailed(); | 109 return scriptFailed(); |
| 110 | 110 |
| 111 advanceTo(StateExecuting); | 111 advanceTo(StateExecuting); |
| 112 | 112 |
| 113 // Ian says we'll remove microtasks, but for now execute them right before | 113 // Ian says we'll remove microtasks, but for now execute them right before |
| 114 // we "run" the script (call 'init'), not at dependency resolution | 114 // we "run" the script (call 'init'), not at dependency resolution |
| 115 // or script failures, etc. | 115 // or script failures, etc. |
| 116 Microtask::performCheckpoint(); | 116 Microtask::performCheckpoint(); |
| 117 | 117 |
| 118 if (LocalFrame* frame = contextFrame(m_element.get())) | 118 if (LocalFrame* frame = contextFrame(m_element.get())) { |
| 119 frame->dart().ExecuteLibraryInModule(module.get(), library->dart_value()); | 119 frame->dart().ExecuteLibraryInModule(module.get(), |
|
eseidel
2015/02/21 00:08:13
We should just pass the script and hang the librar
abarth-chromium
2015/02/21 05:40:05
Ok. I'll do this in a later CL.
| |
| 120 library->dart_value(), | |
| 121 m_element.get()); | |
| 122 } | |
| 120 | 123 |
| 121 advanceTo(StateCompleted); | 124 advanceTo(StateCompleted); |
| 122 // We may be deleted at this point. | 125 // We may be deleted at this point. |
| 123 } | 126 } |
| 124 | 127 |
| 125 } | 128 } |
| OLD | NEW |