OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Peter Kelly (pmk@post.com) | 4 * (C) 2001 Peter Kelly (pmk@post.com) |
5 * (C) 2001 Dirk Mueller (mueller@kde.org) | 5 * (C) 2001 Dirk Mueller (mueller@kde.org) |
6 * (C) 2007 David Smith (catfish.man@gmail.com) | 6 * (C) 2007 David Smith (catfish.man@gmail.com) |
7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. | 7 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc.
All rights reserved. |
8 * (C) 2007 Eric Seidel (eric@webkit.org) | 8 * (C) 2007 Eric Seidel (eric@webkit.org) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3269 if (hasRareData()) | 3269 if (hasRareData()) |
3270 visitor->trace(elementRareData()); | 3270 visitor->trace(elementRareData()); |
3271 visitor->trace(m_elementData); | 3271 visitor->trace(m_elementData); |
3272 #endif | 3272 #endif |
3273 ContainerNode::trace(visitor); | 3273 ContainerNode::trace(visitor); |
3274 } | 3274 } |
3275 | 3275 |
3276 v8::Handle<v8::Object> Element::wrap(v8::Handle<v8::Object> creationContext, v8:
:Isolate* isolate) | 3276 v8::Handle<v8::Object> Element::wrap(v8::Handle<v8::Object> creationContext, v8:
:Isolate* isolate) |
3277 { | 3277 { |
3278 if (isCustomElement()) | 3278 if (isCustomElement()) |
3279 return wrapCustomElement(creationContext, isolate); | 3279 return wrapCustomElement(isolate, creationContext); |
3280 return ContainerNode::wrap(creationContext, isolate); | 3280 return ContainerNode::wrap(creationContext, isolate); |
3281 } | 3281 } |
3282 | 3282 |
3283 v8::Handle<v8::Object> Element::wrapCustomElement(v8::Handle<v8::Object> creatio
nContext, v8::Isolate* isolate) | 3283 v8::Handle<v8::Object> Element::wrapCustomElement(v8::Isolate* isolate, v8::Hand
le<v8::Object> creationContext) |
3284 { | 3284 { |
3285 // It's possible that no one except for the new wrapper owns this object at | 3285 // It's possible that no one except for the new wrapper owns this object at |
3286 // this moment, so we have to prevent GC to collect this object until the | 3286 // this moment, so we have to prevent GC to collect this object until the |
3287 // object gets associated with the wrapper. | 3287 // object gets associated with the wrapper. |
3288 RefPtrWillBeRawPtr<Element> protect(this); | 3288 RefPtrWillBeRawPtr<Element> protect(this); |
3289 | 3289 |
3290 ASSERT(!DOMDataStore::containsWrapper(this, isolate)); | 3290 ASSERT(!DOMDataStore::containsWrapper(this, isolate)); |
3291 | 3291 |
3292 ASSERT(!creationContext.IsEmpty()); | 3292 ASSERT(!creationContext.IsEmpty()); |
3293 v8::Handle<v8::Context> context = creationContext->CreationContext(); | 3293 v8::Handle<v8::Context> context = creationContext->CreationContext(); |
(...skipping 11 matching lines...) Expand all Loading... |
3305 return wrapper; | 3305 return wrapper; |
3306 | 3306 |
3307 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); | 3307 CustomElementBinding* binding = perContextData->customElementBinding(customE
lementDefinition()); |
3308 | 3308 |
3309 wrapper->SetPrototype(binding->prototype()); | 3309 wrapper->SetPrototype(binding->prototype()); |
3310 | 3310 |
3311 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); | 3311 return V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperType,
wrapper); |
3312 } | 3312 } |
3313 | 3313 |
3314 } // namespace blink | 3314 } // namespace blink |
OLD | NEW |