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

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2296573003: binding: Reduces the binary size of binding's generated code. (Closed)
Patch Set: Created 4 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
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 * (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 5851 matching lines...) Expand 10 before | Expand all | Expand 10 after
5862 5862
5863 if (frame() && frame()->script().initializeMainWorld()) { 5863 if (frame() && frame()->script().initializeMainWorld()) {
5864 // initializeMainWorld may have created a wrapper for the object, retry from the start. 5864 // initializeMainWorld may have created a wrapper for the object, retry from the start.
5865 v8::Local<v8::Object> wrapper = DOMDataStore::getWrapper(this, isolate); 5865 v8::Local<v8::Object> wrapper = DOMDataStore::getWrapper(this, isolate);
5866 if (!wrapper.IsEmpty()) 5866 if (!wrapper.IsEmpty())
5867 return wrapper; 5867 return wrapper;
5868 } 5868 }
5869 5869
5870 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio nContext, wrapperType); 5870 v8::Local<v8::Object> wrapper = V8DOMWrapper::createWrapper(isolate, creatio nContext, wrapperType);
5871 DCHECK(!wrapper.IsEmpty()); 5871 DCHECK(!wrapper.IsEmpty());
5872 wrapperType->installConditionallyEnabledProperties(wrapper, isolate);
5873 return associateWithWrapper(isolate, wrapperType, wrapper); 5872 return associateWithWrapper(isolate, wrapperType, wrapper);
5874 } 5873 }
5875 5874
5876 v8::Local<v8::Object> Document::associateWithWrapper(v8::Isolate* isolate, const WrapperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper) 5875 v8::Local<v8::Object> Document::associateWithWrapper(v8::Isolate* isolate, const WrapperTypeInfo* wrapperType, v8::Local<v8::Object> wrapper)
5877 { 5876 {
5878 wrapper = V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTyp e, wrapper); 5877 wrapper = V8DOMWrapper::associateObjectWithWrapper(isolate, this, wrapperTyp e, wrapper);
5879 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); 5878 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate);
5880 if (world.isMainWorld() && frame()) 5879 if (world.isMainWorld() && frame())
5881 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper); 5880 frame()->script().windowProxy(world)->updateDocumentWrapper(wrapper);
5882 return wrapper; 5881 return wrapper;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6050 } 6049 }
6051 6050
6052 void showLiveDocumentInstances() 6051 void showLiveDocumentInstances()
6053 { 6052 {
6054 WeakDocumentSet& set = liveDocumentSet(); 6053 WeakDocumentSet& set = liveDocumentSet();
6055 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6054 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6056 for (Document* document : set) 6055 for (Document* document : set)
6057 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data()); 6056 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get String().utf8().data());
6058 } 6057 }
6059 #endif 6058 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698