| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 bool V8V0CustomElementLifecycleCallbacks::setBinding(PassOwnPtr<V0CustomElementB
inding> binding) | 126 bool V8V0CustomElementLifecycleCallbacks::setBinding(PassOwnPtr<V0CustomElementB
inding> binding) |
| 127 { | 127 { |
| 128 V8PerContextData* perContextData = creationContextData(); | 128 V8PerContextData* perContextData = creationContextData(); |
| 129 if (!perContextData) | 129 if (!perContextData) |
| 130 return false; | 130 return false; |
| 131 | 131 |
| 132 // The context is responsible for keeping the prototype | 132 // The context is responsible for keeping the prototype |
| 133 // alive. This in turn keeps callbacks alive through hidden | 133 // alive. This in turn keeps callbacks alive through hidden |
| 134 // references; see CALLBACK_LIST(SET_HIDDEN_VALUE). | 134 // references; see CALLBACK_LIST(SET_HIDDEN_VALUE). |
| 135 perContextData->addCustomElementBinding(std::move(binding)); | 135 perContextData->customElements()->v0AddBinding(std::move(binding)); |
| 136 return true; | 136 return true; |
| 137 } | 137 } |
| 138 | 138 |
| 139 void V8V0CustomElementLifecycleCallbacks::created(Element* element) | 139 void V8V0CustomElementLifecycleCallbacks::created(Element* element) |
| 140 { | 140 { |
| 141 // FIXME: callbacks while paused should be queued up for execution to | 141 // FIXME: callbacks while paused should be queued up for execution to |
| 142 // continue then be delivered in order rather than delivered immediately. | 142 // continue then be delivered in order rather than delivered immediately. |
| 143 // Bug 329665 tracks similar behavior for other synchronous events. | 143 // Bug 329665 tracks similar behavior for other synchronous events. |
| 144 if (!getExecutionContext() || getExecutionContext()->activeDOMObjectsAreStop
ped()) | 144 if (!getExecutionContext() || getExecutionContext()->activeDOMObjectsAreStop
ped()) |
| 145 return; | 145 return; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 ScriptController::callFunction(getExecutionContext(), callback, receiver, 0,
0, isolate); | 241 ScriptController::callFunction(getExecutionContext(), callback, receiver, 0,
0, isolate); |
| 242 } | 242 } |
| 243 | 243 |
| 244 DEFINE_TRACE(V8V0CustomElementLifecycleCallbacks) | 244 DEFINE_TRACE(V8V0CustomElementLifecycleCallbacks) |
| 245 { | 245 { |
| 246 V0CustomElementLifecycleCallbacks::trace(visitor); | 246 V0CustomElementLifecycleCallbacks::trace(visitor); |
| 247 ContextLifecycleObserver::trace(visitor); | 247 ContextLifecycleObserver::trace(visitor); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace blink | 250 } // namespace blink |
| OLD | NEW |