| 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 5832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5843 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); | 5843 const WrapperTypeInfo* wrapperType = wrapperTypeInfo(); |
| 5844 | 5844 |
| 5845 if (frame() && frame()->script().initializeMainWorld()) { | 5845 if (frame() && frame()->script().initializeMainWorld()) { |
| 5846 // initializeMainWorld may have created a wrapper for the object, retry
from the start. | 5846 // initializeMainWorld may have created a wrapper for the object, retry
from the start. |
| 5847 v8::Local<v8::Object> wrapper = DOMDataStore::getWrapper(this, isolate); | 5847 v8::Local<v8::Object> wrapper = DOMDataStore::getWrapper(this, isolate); |
| 5848 if (!wrapper.IsEmpty()) | 5848 if (!wrapper.IsEmpty()) |
| 5849 return wrapper; | 5849 return wrapper; |
| 5850 } | 5850 } |
| 5851 | 5851 |
| 5852 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio
nContext, wrapperType); | 5852 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio
nContext, wrapperType); |
| 5853 if (UNLIKELY(wrapper.IsEmpty())) | 5853 DCHECK(!wrapper.IsEmpty()); |
| 5854 return wrapper; | |
| 5855 | |
| 5856 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); | 5854 wrapperType->installConditionallyEnabledProperties(wrapper, isolate); |
| 5857 return associateWithWrapper(isolate, wrapperType, wrapper); | 5855 return associateWithWrapper(isolate, wrapperType, wrapper); |
| 5858 } | 5856 } |
| 5859 | 5857 |
| 5860 v8::Local<v8::Object> Document::associateWithWrapper(v8::Isolate* isolate, const
WrapperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper) | 5858 v8::Local<v8::Object> Document::associateWithWrapper(v8::Isolate* isolate, const
WrapperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper) |
| 5861 { | 5859 { |
| 5862 wrapper = V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTyp
e, wrapper); | 5860 wrapper = V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTyp
e, wrapper); |
| 5863 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); | 5861 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); |
| 5864 if (world.isMainWorld() && frame()) | 5862 if (world.isMainWorld() && frame()) |
| 5865 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); | 5863 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6034 } | 6032 } |
| 6035 | 6033 |
| 6036 void showLiveDocumentInstances() | 6034 void showLiveDocumentInstances() |
| 6037 { | 6035 { |
| 6038 WeakDocumentSet& set = liveDocumentSet(); | 6036 WeakDocumentSet& set = liveDocumentSet(); |
| 6039 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6037 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6040 for (Document* document : set) | 6038 for (Document* document : set) |
| 6041 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6039 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
| 6042 } | 6040 } |
| 6043 #endif | 6041 #endif |
| OLD | NEW |