| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ASSERT(!tryCatch.HasCaught()); | 149 ASSERT(!tryCatch.HasCaught()); |
| 150 ASSERT(m_wrapperType); | 150 ASSERT(m_wrapperType); |
| 151 tagName = QualifiedName(nullAtom, localName, namespaceURI); | 151 tagName = QualifiedName(nullAtom, localName, namespaceURI); |
| 152 return m_wrapperType; | 152 return m_wrapperType; |
| 153 } | 153 } |
| 154 | 154 |
| 155 PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::cre
ateCallbacks() | 155 PassRefPtr<CustomElementLifecycleCallbacks> CustomElementConstructorBuilder::cre
ateCallbacks() |
| 156 { | 156 { |
| 157 ASSERT(!m_prototype.IsEmpty()); | 157 ASSERT(!m_prototype.IsEmpty()); |
| 158 | 158 |
| 159 RefPtr<ExecutionContext> executionContext = m_scriptState->executionContext(
); |
| 160 |
| 159 v8::TryCatch exceptionCatcher; | 161 v8::TryCatch exceptionCatcher; |
| 160 exceptionCatcher.SetVerbose(true); | 162 exceptionCatcher.SetVerbose(true); |
| 161 | 163 |
| 162 v8::Isolate* isolate = m_scriptState->isolate(); | 164 v8::Isolate* isolate = m_scriptState->isolate(); |
| 163 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac
k"); | 165 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac
k"); |
| 164 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb
ack"); | 166 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb
ack"); |
| 165 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb
ack"); | 167 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb
ack"); |
| 166 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri
buteChangedCallback"); | 168 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri
buteChangedCallback"); |
| 167 | 169 |
| 168 m_callbacks = V8CustomElementLifecycleCallbacks::create(m_scriptState.get(),
m_prototype, created, attached, detached, attributeChanged); | 170 m_callbacks = V8CustomElementLifecycleCallbacks::create(m_scriptState.get(),
m_prototype, created, attached, detached, attributeChanged); |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 #if ENABLE(OILPAN) | 302 #if ENABLE(OILPAN) |
| 301 // FIXME: Oilpan: We don't have RawPtr<Eement> version of | 303 // FIXME: Oilpan: We don't have RawPtr<Eement> version of |
| 302 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected. | 304 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected. |
| 303 v8SetReturnValueFast(info, element.get(), document); | 305 v8SetReturnValueFast(info, element.get(), document); |
| 304 #else | 306 #else |
| 305 v8SetReturnValueFast(info, element.release(), document); | 307 v8SetReturnValueFast(info, element.release(), document); |
| 306 #endif | 308 #endif |
| 307 } | 309 } |
| 308 | 310 |
| 309 } // namespace WebCore | 311 } // namespace WebCore |
| OLD | NEW |