| 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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; |
| 146 | 146 |
| 147 if (!m_scriptState->contextIsValid()) | 147 if (!m_scriptState->contextIsValid()) |
| 148 return; | 148 return; |
| 149 | 149 |
| 150 element->setCustomElementState(Element::Upgraded); | 150 element->setV0CustomElementState(Element::V0Upgraded); |
| 151 | 151 |
| 152 ScriptState::Scope scope(m_scriptState.get()); | 152 ScriptState::Scope scope(m_scriptState.get()); |
| 153 v8::Isolate* isolate = m_scriptState->isolate(); | 153 v8::Isolate* isolate = m_scriptState->isolate(); |
| 154 v8::Local<v8::Context> context = m_scriptState->context(); | 154 v8::Local<v8::Context> context = m_scriptState->context(); |
| 155 v8::Local<v8::Value> receiverValue = toV8(element, context->Global(), isolat
e); | 155 v8::Local<v8::Value> receiverValue = toV8(element, context->Global(), isolat
e); |
| 156 if (receiverValue.IsEmpty()) | 156 if (receiverValue.IsEmpty()) |
| 157 return; | 157 return; |
| 158 v8::Local<v8::Object> receiver = receiverValue.As<v8::Object>(); | 158 v8::Local<v8::Object> receiver = receiverValue.As<v8::Object>(); |
| 159 | 159 |
| 160 // Swizzle the prototype of the wrapper. | 160 // Swizzle the prototype of the wrapper. |
| (...skipping 80 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 |