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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 5753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5764 // initializeMainWorld may have created a wrapper for the object, retry from the start. | 5764 // initializeMainWorld may have created a wrapper for the object, retry from the start. |
5765 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperNonTemplate(thi s, isolate); | 5765 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperNonTemplate(thi s, isolate); |
5766 if (!wrapper.IsEmpty()) | 5766 if (!wrapper.IsEmpty()) |
5767 return wrapper; | 5767 return wrapper; |
5768 } | 5768 } |
5769 | 5769 |
5770 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , wrapperType, toScriptWrappableBase(), isolate); | 5770 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , wrapperType, toScriptWrappableBase(), isolate); |
5771 if (UNLIKELY(wrapper.IsEmpty())) | 5771 if (UNLIKELY(wrapper.IsEmpty())) |
5772 return wrapper; | 5772 return wrapper; |
5773 | 5773 |
5774 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); | 5774 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); |
haraken
2014/09/08 08:48:45
Probably this needs to be in associateWithWrapper,
Yuki
2014/09/08 09:00:22
Reading bindings/templates/methods.cpp, the origin
| |
5775 return associateWithWrapper(wrapperType, wrapper, isolate); | |
5776 } | |
5777 | |
5778 v8::Handle<v8::Object> Document::associateWithWrapper(const WrapperTypeInfo* wra pperType, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate) | |
5779 { | |
5775 wrapperType->refObject(toScriptWrappableBase()); | 5780 wrapperType->refObject(toScriptWrappableBase()); |
5776 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate); | 5781 V8DOMWrapper::associateObjectWithWrapperNonTemplate(this, wrapperType, wrapp er, isolate); |
5777 | |
5778 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); | 5782 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); |
5779 if (world.isMainWorld() && frame()) | 5783 if (world.isMainWorld() && frame()) |
5780 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); | 5784 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); |
5781 | |
5782 return wrapper; | 5785 return wrapper; |
5783 } | 5786 } |
5784 | 5787 |
5785 void Document::trace(Visitor* visitor) | 5788 void Document::trace(Visitor* visitor) |
5786 { | 5789 { |
5787 #if ENABLE(OILPAN) | 5790 #if ENABLE(OILPAN) |
5788 visitor->trace(m_importsController); | 5791 visitor->trace(m_importsController); |
5789 visitor->trace(m_docType); | 5792 visitor->trace(m_docType); |
5790 visitor->trace(m_implementation); | 5793 visitor->trace(m_implementation); |
5791 visitor->trace(m_autofocusElement); | 5794 visitor->trace(m_autofocusElement); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5847 using namespace blink; | 5850 using namespace blink; |
5848 void showLiveDocumentInstances() | 5851 void showLiveDocumentInstances() |
5849 { | 5852 { |
5850 WeakDocumentSet& set = liveDocumentSet(); | 5853 WeakDocumentSet& set = liveDocumentSet(); |
5851 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5854 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5852 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { | 5855 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it ) { |
5853 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); | 5856 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut f8().data()); |
5854 } | 5857 } |
5855 } | 5858 } |
5856 #endif | 5859 #endif |
OLD | NEW |