| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
| 6 | 6 |
| 7 #include "config.h" | 7 #include "config.h" |
| 8 #include "V8TestInterfaceDocument.h" | 8 #include "V8TestInterfaceDocument.h" |
| 9 | 9 |
| 10 #include "RuntimeEnabledFeatures.h" | 10 #include "RuntimeEnabledFeatures.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 } | 32 } |
| 33 | 33 |
| 34 } // namespace WebCore | 34 } // namespace WebCore |
| 35 | 35 |
| 36 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceDocument
* object) | 36 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterfaceDocument
* object) |
| 37 { | 37 { |
| 38 WebCore::initializeScriptWrappableForInterface(object); | 38 WebCore::initializeScriptWrappableForInterface(object); |
| 39 } | 39 } |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 const WrapperTypeInfo V8TestInterfaceDocument::wrapperTypeInfo = { gin::kEmbedde
rBlink, V8TestInterfaceDocument::domTemplate, V8TestInterfaceDocument::derefObje
ct, 0, V8TestInterfaceDocument::toEventTarget, 0, V8TestInterfaceDocument::insta
llPerContextEnabledMethods, &V8Document::wrapperTypeInfo, WrapperTypeObjectProto
type, RefCountedObject }; | 42 const WrapperTypeInfo V8TestInterfaceDocument::wrapperTypeInfo = { gin::kEmbedde
rBlink, V8TestInterfaceDocument::domTemplate, V8TestInterfaceDocument::derefObje
ct, 0, V8TestInterfaceDocument::toEventTarget, 0, V8TestInterfaceDocument::insta
llPerContextEnabledMethods, &V8Document::wrapperTypeInfo, WrapperTypeObjectProto
type, WillBeGarbageCollectedObject }; |
| 43 | 43 |
| 44 namespace TestInterfaceDocumentV8Internal { | 44 namespace TestInterfaceDocumentV8Internal { |
| 45 | 45 |
| 46 template <typename T> void V8_USE(T) { } | 46 template <typename T> void V8_USE(T) { } |
| 47 | 47 |
| 48 } // namespace TestInterfaceDocumentV8Internal | 48 } // namespace TestInterfaceDocumentV8Internal |
| 49 | 49 |
| 50 static void configureV8TestInterfaceDocumentTemplate(v8::Handle<v8::FunctionTemp
late> functionTemplate, v8::Isolate* isolate) | 50 static void configureV8TestInterfaceDocumentTemplate(v8::Handle<v8::FunctionTemp
late> functionTemplate, v8::Isolate* isolate) |
| 51 { | 51 { |
| 52 functionTemplate->ReadOnlyPrototype(); | 52 functionTemplate->ReadOnlyPrototype(); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 if (wrapper.IsEmpty()) | 105 if (wrapper.IsEmpty()) |
| 106 return wrapper; | 106 return wrapper; |
| 107 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); | 107 DOMWrapperWorld& world = DOMWrapperWorld::current(isolate); |
| 108 if (world.isMainWorld()) { | 108 if (world.isMainWorld()) { |
| 109 if (LocalFrame* frame = impl->frame()) | 109 if (LocalFrame* frame = impl->frame()) |
| 110 frame->script().windowShell(world)->updateDocumentWrapper(wrapper); | 110 frame->script().windowShell(world)->updateDocumentWrapper(wrapper); |
| 111 } | 111 } |
| 112 return wrapper; | 112 return wrapper; |
| 113 } | 113 } |
| 114 | 114 |
| 115 v8::Handle<v8::Object> V8TestInterfaceDocument::createWrapper(PassRefPtr<TestInt
erfaceDocument> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola
te) | 115 v8::Handle<v8::Object> V8TestInterfaceDocument::createWrapper(PassRefPtrWillBeRa
wPtr<TestInterfaceDocument> impl, v8::Handle<v8::Object> creationContext, v8::Is
olate* isolate) |
| 116 { | 116 { |
| 117 ASSERT(impl); | 117 ASSERT(impl); |
| 118 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceDocument>(impl.get(), i
solate)); | 118 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceDocument>(impl.get(), i
solate)); |
| 119 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 119 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
| 120 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 120 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
| 121 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 121 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 122 // the same object de-ref functions, though, so use that as the basis of
the check. | 122 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 123 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 123 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 124 } | 124 } |
| 125 | 125 |
| 126 if (LocalFrame* frame = impl->frame()) { | 126 if (LocalFrame* frame = impl->frame()) { |
| 127 if (frame->script().initializeMainWorld()) { | 127 if (frame->script().initializeMainWorld()) { |
| 128 // initializeMainWorld may have created a wrapper for the object, re
try from the start. | 128 // initializeMainWorld may have created a wrapper for the object, re
try from the start. |
| 129 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapper<V8TestInte
rfaceDocument>(impl.get(), isolate); | 129 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapper<V8TestInte
rfaceDocument>(impl.get(), isolate); |
| 130 if (!wrapper.IsEmpty()) | 130 if (!wrapper.IsEmpty()) |
| 131 return wrapper; | 131 return wrapper; |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 134 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 135 if (UNLIKELY(wrapper.IsEmpty())) | 135 if (UNLIKELY(wrapper.IsEmpty())) |
| 136 return wrapper; | 136 return wrapper; |
| 137 | 137 |
| 138 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 138 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 139 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceDocument>(impl, &wra
pperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); | 139 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceDocument>(impl, &wra
pperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); |
| 140 return wrapper; | 140 return wrapper; |
| 141 } | 141 } |
| 142 | 142 |
| 143 void V8TestInterfaceDocument::derefObject(void* object) | 143 void V8TestInterfaceDocument::derefObject(void* object) |
| 144 { | 144 { |
| 145 #if !ENABLE(OILPAN) |
| 145 fromInternalPointer(object)->deref(); | 146 fromInternalPointer(object)->deref(); |
| 147 #endif // !ENABLE(OILPAN) |
| 146 } | 148 } |
| 147 | 149 |
| 148 template<> | 150 template<> |
| 149 v8::Handle<v8::Value> toV8NoInline(TestInterfaceDocument* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) | 151 v8::Handle<v8::Value> toV8NoInline(TestInterfaceDocument* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) |
| 150 { | 152 { |
| 151 return toV8(impl, creationContext, isolate); | 153 return toV8(impl, creationContext, isolate); |
| 152 } | 154 } |
| 153 | 155 |
| 154 } // namespace WebCore | 156 } // namespace WebCore |
| OLD | NEW |