Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: Source/core/dom/Node.cpp

Issue 542113003: bindings: Introduces ScriptWrappable::associateWithWrapper in addition to wrap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2472 { 2472 {
2473 ASSERT(!DOMDataStore::containsWrapperNonTemplate(this, isolate)); 2473 ASSERT(!DOMDataStore::containsWrapperNonTemplate(this, isolate));
2474 2474
2475 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); 2475 const WrapperTypeInfo* wrapperType = wrapperTypeInfo();
2476 2476
2477 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , wrapperType, toScriptWrappableBase(), isolate); 2477 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , wrapperType, toScriptWrappableBase(), isolate);
2478 if (UNLIKELY(wrapper.IsEmpty())) 2478 if (UNLIKELY(wrapper.IsEmpty()))
2479 return wrapper; 2479 return wrapper;
2480 2480
2481 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); 2481 wrapperType->installConditionallyEnabledProperties(wrapper, isolate);
2482 return associateWithWrapper(wrapperType, wrapper, isolate);
2483 }
2484
2485 v8::Handle<v8::Object> Node::associateWithWrapper(const WrapperTypeInfo* wrapper Type, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate)
2486 {
2482 wrapperType->refObject(toScriptWrappableBase()); 2487 wrapperType->refObject(toScriptWrappableBase());
2483 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate); 2488 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate);
2484 return wrapper; 2489 return wrapper;
2485 } 2490 }
2486 2491
2487 } // namespace blink 2492 } // namespace blink
2488 2493
2489 #ifndef NDEBUG 2494 #ifndef NDEBUG
2490 2495
2491 void showNode(const blink::Node* node) 2496 void showNode(const blink::Node* node)
2492 { 2497 {
2493 if (node) 2498 if (node)
2494 node->showNode(""); 2499 node->showNode("");
2495 } 2500 }
2496 2501
2497 void showTree(const blink::Node* node) 2502 void showTree(const blink::Node* node)
2498 { 2503 {
2499 if (node) 2504 if (node)
2500 node->showTreeForThis(); 2505 node->showTreeForThis();
2501 } 2506 }
2502 2507
2503 void showNodePath(const blink::Node* node) 2508 void showNodePath(const blink::Node* node)
2504 { 2509 {
2505 if (node) 2510 if (node)
2506 node->showNodePathForThis(); 2511 node->showNodePathForThis();
2507 } 2512 }
2508 2513
2509 #endif 2514 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698