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 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 2462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2473 { | 2473 { |
2474 ASSERT(!DOMDataStore::containsWrapperNonTemplate(this, isolate)); | 2474 ASSERT(!DOMDataStore::containsWrapperNonTemplate(this, isolate)); |
2475 | 2475 |
2476 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); | 2476 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); |
2477 | 2477 |
2478 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, wrapperType, toScriptWrappableBase(), isolate); | 2478 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, wrapperType, toScriptWrappableBase(), isolate); |
2479 if (UNLIKELY(wrapper.IsEmpty())) | 2479 if (UNLIKELY(wrapper.IsEmpty())) |
2480 return wrapper; | 2480 return wrapper; |
2481 | 2481 |
2482 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); | 2482 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); |
| 2483 return associateWithWrapper(wrapperType, wrapper, isolate); |
| 2484 } |
| 2485 |
| 2486 v8::Handle<v8::Object> Node::associateWithWrapper(const WrapperTypeInfo* wrapper
Type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate) |
| 2487 { |
2483 wrapperType->refObject(toScriptWrappableBase()); | 2488 wrapperType->refObject(toScriptWrappableBase()); |
2484 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp
er, isolate); | 2489 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp
er, isolate); |
2485 return wrapper; | 2490 return wrapper; |
2486 } | 2491 } |
2487 | 2492 |
2488 } // namespace blink | 2493 } // namespace blink |
2489 | 2494 |
2490 #ifndef NDEBUG | 2495 #ifndef NDEBUG |
2491 | 2496 |
2492 void showNode(const blink::Node* node) | 2497 void showNode(const blink::Node* node) |
2493 { | 2498 { |
2494 if (node) | 2499 if (node) |
2495 node->showNode(""); | 2500 node->showNode(""); |
2496 } | 2501 } |
2497 | 2502 |
2498 void showTree(const blink::Node* node) | 2503 void showTree(const blink::Node* node) |
2499 { | 2504 { |
2500 if (node) | 2505 if (node) |
2501 node->showTreeForThis(); | 2506 node->showTreeForThis(); |
2502 } | 2507 } |
2503 | 2508 |
2504 void showNodePath(const blink::Node* node) | 2509 void showNodePath(const blink::Node* node) |
2505 { | 2510 { |
2506 if (node) | 2511 if (node) |
2507 node->showNodePathForThis(); | 2512 node->showNodePathForThis(); |
2508 } | 2513 } |
2509 | 2514 |
2510 #endif | 2515 #endif |
OLD | NEW |