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

Side by Side Diff: Source/bindings/tests/results/V8TestMediaQueryListListener.cpp

Issue 39393004: IDL compiler: rename WrapperTypeInfo info => wrapperTypeInfo (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
(...skipping 21 matching lines...) Expand all
32 #include "core/dom/ContextFeatures.h" 32 #include "core/dom/ContextFeatures.h"
33 #include "core/dom/Document.h" 33 #include "core/dom/Document.h"
34 #include "platform/TraceEvent.h" 34 #include "platform/TraceEvent.h"
35 #include "wtf/UnusedParam.h" 35 #include "wtf/UnusedParam.h"
36 36
37 namespace WebCore { 37 namespace WebCore {
38 38
39 static void initializeScriptWrappableForInterface(TestMediaQueryListListener* ob ject) 39 static void initializeScriptWrappableForInterface(TestMediaQueryListListener* ob ject)
40 { 40 {
41 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 41 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
42 ScriptWrappable::setTypeInfoInObject(object, &V8TestMediaQueryListListen er::info); 42 ScriptWrappable::setTypeInfoInObject(object, &V8TestMediaQueryListListen er::wrapperTypeInfo);
43 else 43 else
44 ASSERT_NOT_REACHED(); 44 ASSERT_NOT_REACHED();
45 } 45 }
46 46
47 } // namespace WebCore 47 } // namespace WebCore
48 48
49 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 49 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows:
50 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function 50 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
51 // in the global namespace. 51 // in the global namespace.
52 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c) 52 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c)
53 void webCoreInitializeScriptWrappableForInterface(WebCore::TestMediaQueryListLis tener* object) 53 void webCoreInitializeScriptWrappableForInterface(WebCore::TestMediaQueryListLis tener* object)
54 { 54 {
55 WebCore::initializeScriptWrappableForInterface(object); 55 WebCore::initializeScriptWrappableForInterface(object);
56 } 56 }
57 57
58 namespace WebCore { 58 namespace WebCore {
59 WrapperTypeInfo V8TestMediaQueryListListener::info = { V8TestMediaQueryListListe ner::GetTemplate, V8TestMediaQueryListListener::derefObject, 0, 0, 0, V8TestMedi aQueryListListener::installPerContextEnabledPrototypeProperties, 0, WrapperTypeO bjectPrototype }; 59 WrapperTypeInfo V8TestMediaQueryListListener::wrapperTypeInfo = { V8TestMediaQue ryListListener::GetTemplate, V8TestMediaQueryListListener::derefObject, 0, 0, 0, V8TestMediaQueryListListener::installPerContextEnabledPrototypeProperties, 0, W rapperTypeObjectPrototype };
60 60
61 namespace TestMediaQueryListListenerV8Internal { 61 namespace TestMediaQueryListListenerV8Internal {
62 62
63 template <typename T> void V8_USE(T) { } 63 template <typename T> void V8_USE(T) { }
64 64
65 static void methodMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 65 static void methodMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
66 { 66 {
67 if (UNLIKELY(args.Length() < 1)) { 67 if (UNLIKELY(args.Length() < 1)) {
68 throwTypeError(ExceptionMessages::failedToExecute("method", "TestMediaQu eryListListener", ExceptionMessages::notEnoughArguments(1, args.Length())), args .GetIsolate()); 68 throwTypeError(ExceptionMessages::failedToExecute("method", "TestMediaQu eryListListener", ExceptionMessages::notEnoughArguments(1, args.Length())), args .GetIsolate());
69 return; 69 return;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 UNUSED_PARAM(proto); 103 UNUSED_PARAM(proto);
104 104
105 // Custom toString template 105 // Custom toString template
106 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate()); 106 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate());
107 return desc; 107 return desc;
108 } 108 }
109 109
110 v8::Handle<v8::FunctionTemplate> V8TestMediaQueryListListener::GetTemplate(v8::I solate* isolate, WrapperWorldType currentWorldType) 110 v8::Handle<v8::FunctionTemplate> V8TestMediaQueryListListener::GetTemplate(v8::I solate* isolate, WrapperWorldType currentWorldType)
111 { 111 {
112 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 112 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
113 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info); 113 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
114 if (result != data->templateMap(currentWorldType).end()) 114 if (result != data->templateMap(currentWorldType).end())
115 return result->value.newLocal(isolate); 115 return result->value.newLocal(isolate);
116 116
117 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); 117 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
118 v8::HandleScope handleScope(isolate); 118 v8::HandleScope handleScope(isolate);
119 v8::Handle<v8::FunctionTemplate> templ = 119 v8::Handle<v8::FunctionTemplate> templ =
120 ConfigureV8TestMediaQueryListListenerTemplate(data->rawTemplate(&info, c urrentWorldType), isolate, currentWorldType); 120 ConfigureV8TestMediaQueryListListenerTemplate(data->rawTemplate(&wrapper TypeInfo, currentWorldType), isolate, currentWorldType);
121 data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::Function Template>(isolate, templ)); 121 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ));
122 return handleScope.Close(templ); 122 return handleScope.Close(templ);
123 } 123 }
124 124
125 bool V8TestMediaQueryListListener::HasInstance(v8::Handle<v8::Value> jsValue, v8 ::Isolate* isolate, WrapperWorldType currentWorldType) 125 bool V8TestMediaQueryListListener::HasInstance(v8::Handle<v8::Value> jsValue, v8 ::Isolate* isolate, WrapperWorldType currentWorldType)
126 { 126 {
127 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, currentW orldType); 127 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType);
128 } 128 }
129 129
130 bool V8TestMediaQueryListListener::HasInstanceInAnyWorld(v8::Handle<v8::Value> j sValue, v8::Isolate* isolate) 130 bool V8TestMediaQueryListListener::HasInstanceInAnyWorld(v8::Handle<v8::Value> j sValue, v8::Isolate* isolate)
131 { 131 {
132 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, MainWorl d) 132 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld)
133 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, Isolated World) 133 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld)
134 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, WorkerWo rld); 134 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld);
135 } 135 }
136 136
137 v8::Handle<v8::Object> V8TestMediaQueryListListener::createWrapper(PassRefPtr<Te stMediaQueryListListener> impl, v8::Handle<v8::Object> creationContext, v8::Isol ate* isolate) 137 v8::Handle<v8::Object> V8TestMediaQueryListListener::createWrapper(PassRefPtr<Te stMediaQueryListListener> impl, v8::Handle<v8::Object> creationContext, v8::Isol ate* isolate)
138 { 138 {
139 ASSERT(impl); 139 ASSERT(impl);
140 ASSERT(!DOMDataStore::containsWrapper<V8TestMediaQueryListListener>(impl.get (), isolate)); 140 ASSERT(!DOMDataStore::containsWrapper<V8TestMediaQueryListListener>(impl.get (), isolate));
141 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 141 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
142 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 142 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
143 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 143 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
144 // the same object de-ref functions, though, so use that as the basis of the check. 144 // the same object de-ref functions, though, so use that as the basis of the check.
145 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction); 145 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
146 } 146 }
147 147
148 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate); 148 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
149 if (UNLIKELY(wrapper.IsEmpty())) 149 if (UNLIKELY(wrapper.IsEmpty()))
150 return wrapper; 150 return wrapper;
151 151
152 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 152 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
153 V8DOMWrapper::associateObjectWithWrapper<V8TestMediaQueryListListener>(impl, &info, wrapper, isolate, WrapperConfiguration::Independent); 153 V8DOMWrapper::associateObjectWithWrapper<V8TestMediaQueryListListener>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
154 return wrapper; 154 return wrapper;
155 } 155 }
156 156
157 void V8TestMediaQueryListListener::derefObject(void* object) 157 void V8TestMediaQueryListListener::derefObject(void* object)
158 { 158 {
159 fromInternalPointer(object)->deref(); 159 fromInternalPointer(object)->deref();
160 } 160 }
161 161
162 } // namespace WebCore 162 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestMediaQueryListListener.h ('k') | Source/bindings/tests/results/V8TestNamedConstructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698