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 | |
161 v8::TryCatch exceptionCatcher; | 159 v8::TryCatch exceptionCatcher; |
162 exceptionCatcher.SetVerbose(true); | 160 exceptionCatcher.SetVerbose(true); |
163 | 161 |
164 v8::Isolate* isolate = m_scriptState->isolate(); | 162 v8::Isolate* isolate = m_scriptState->isolate(); |
165 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac
k"); | 163 v8::Handle<v8::Function> created = retrieveCallback(isolate, "createdCallbac
k"); |
166 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb
ack"); | 164 v8::Handle<v8::Function> attached = retrieveCallback(isolate, "attachedCallb
ack"); |
167 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb
ack"); | 165 v8::Handle<v8::Function> detached = retrieveCallback(isolate, "detachedCallb
ack"); |
168 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri
buteChangedCallback"); | 166 v8::Handle<v8::Function> attributeChanged = retrieveCallback(isolate, "attri
buteChangedCallback"); |
169 | 167 |
170 m_callbacks = V8CustomElementLifecycleCallbacks::create(m_scriptState.get(),
m_prototype, created, attached, detached, attributeChanged); | 168 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... |
302 #if ENABLE(OILPAN) | 300 #if ENABLE(OILPAN) |
303 // FIXME: Oilpan: We don't have RawPtr<Eement> version of | 301 // FIXME: Oilpan: We don't have RawPtr<Eement> version of |
304 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected. | 302 // v8SetReturnValueFast until Node.idl has WillBeGarbageCollected. |
305 v8SetReturnValueFast(info, element.get(), document); | 303 v8SetReturnValueFast(info, element.get(), document); |
306 #else | 304 #else |
307 v8SetReturnValueFast(info, element.release(), document); | 305 v8SetReturnValueFast(info, element.release(), document); |
308 #endif | 306 #endif |
309 } | 307 } |
310 | 308 |
311 } // namespace WebCore | 309 } // namespace WebCore |
OLD | NEW |