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

Side by Side Diff: Source/bindings/tests/results/V8Float64Array.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 29 matching lines...) Expand all
40 #include "platform/TraceEvent.h" 40 #include "platform/TraceEvent.h"
41 #include "wtf/GetPtr.h" 41 #include "wtf/GetPtr.h"
42 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
43 #include "wtf/UnusedParam.h" 43 #include "wtf/UnusedParam.h"
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 static void initializeScriptWrappableForInterface(Float64Array* object) 47 static void initializeScriptWrappableForInterface(Float64Array* object)
48 { 48 {
49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) 49 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
50 ScriptWrappable::setTypeInfoInObject(object, &V8Float64Array::info); 50 ScriptWrappable::setTypeInfoInObject(object, &V8Float64Array::wrapperTyp eInfo);
51 else 51 else
52 ASSERT_NOT_REACHED(); 52 ASSERT_NOT_REACHED();
53 } 53 }
54 54
55 } // namespace WebCore 55 } // namespace WebCore
56 56
57 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows: 57 // In ScriptWrappable::init, the use of a local function declaration has an issu e on Windows:
58 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function 58 // the local declaration does not pick up the surrounding namespace. Therefore, we provide this function
59 // in the global namespace. 59 // in the global namespace.
60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c) 60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe edback/details/664619/the-namespace-of-local-function-declarations-in-c)
61 void webCoreInitializeScriptWrappableForInterface(Float64Array* object) 61 void webCoreInitializeScriptWrappableForInterface(Float64Array* object)
62 { 62 {
63 WebCore::initializeScriptWrappableForInterface(object); 63 WebCore::initializeScriptWrappableForInterface(object);
64 } 64 }
65 65
66 namespace WebCore { 66 namespace WebCore {
67 WrapperTypeInfo V8Float64Array::info = { V8Float64Array::GetTemplate, V8Float64A rray::derefObject, 0, 0, 0, V8Float64Array::installPerContextEnabledPrototypePro perties, &V8ArrayBufferView::info, WrapperTypeObjectPrototype }; 67 WrapperTypeInfo V8Float64Array::wrapperTypeInfo = { V8Float64Array::GetTemplate, V8Float64Array::derefObject, 0, 0, 0, V8Float64Array::installPerContextEnabledP rototypeProperties, &V8ArrayBufferView::wrapperTypeInfo, WrapperTypeObjectProtot ype };
68 68
69 namespace Float64ArrayV8Internal { 69 namespace Float64ArrayV8Internal {
70 70
71 template <typename T> void V8_USE(T) { } 71 template <typename T> void V8_USE(T) { }
72 72
73 static void fooMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 73 static void fooMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
74 { 74 {
75 if (UNLIKELY(args.Length() < 1)) { 75 if (UNLIKELY(args.Length() < 1)) {
76 throwTypeError(ExceptionMessages::failedToExecute("foo", "Float64Array", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate()); 76 throwTypeError(ExceptionMessages::failedToExecute("foo", "Float64Array", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
77 return; 77 return;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 proto->Set(v8::String::NewSymbol("foo"), v8::FunctionTemplate::New(Float64Ar rayV8Internal::fooMethodCallback, v8Undefined(), fooSignature, 1)); 170 proto->Set(v8::String::NewSymbol("foo"), v8::FunctionTemplate::New(Float64Ar rayV8Internal::fooMethodCallback, v8Undefined(), fooSignature, 1));
171 171
172 // Custom toString template 172 // Custom toString template
173 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate()); 173 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate());
174 return desc; 174 return desc;
175 } 175 }
176 176
177 v8::Handle<v8::FunctionTemplate> V8Float64Array::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType) 177 v8::Handle<v8::FunctionTemplate> V8Float64Array::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType)
178 { 178 {
179 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 179 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
180 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info); 180 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&wrapperTypeInfo);
181 if (result != data->templateMap(currentWorldType).end()) 181 if (result != data->templateMap(currentWorldType).end())
182 return result->value.newLocal(isolate); 182 return result->value.newLocal(isolate);
183 183
184 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); 184 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
185 v8::HandleScope handleScope(isolate); 185 v8::HandleScope handleScope(isolate);
186 v8::Handle<v8::FunctionTemplate> templ = 186 v8::Handle<v8::FunctionTemplate> templ =
187 ConfigureV8Float64ArrayTemplate(data->rawTemplate(&info, currentWorldTyp e), isolate, currentWorldType); 187 ConfigureV8Float64ArrayTemplate(data->rawTemplate(&wrapperTypeInfo, curr entWorldType), isolate, currentWorldType);
188 data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::Function Template>(isolate, templ)); 188 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ));
189 return handleScope.Close(templ); 189 return handleScope.Close(templ);
190 } 190 }
191 191
192 bool V8Float64Array::HasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* iso late, WrapperWorldType currentWorldType) 192 bool V8Float64Array::HasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* iso late, WrapperWorldType currentWorldType)
193 { 193 {
194 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, currentW orldType); 194 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, currentWorldType);
195 } 195 }
196 196
197 bool V8Float64Array::HasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Is olate* isolate) 197 bool V8Float64Array::HasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::Is olate* isolate)
198 { 198 {
199 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, MainWorl d) 199 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, MainWorld)
200 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, Isolated World) 200 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, IsolatedWorld)
201 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, WorkerWo rld); 201 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu e, WorkerWorld);
202 } 202 }
203 203
204 v8::Handle<v8::Object> V8Float64Array::createWrapper(PassRefPtr<Float64Array> im pl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 204 v8::Handle<v8::Object> V8Float64Array::createWrapper(PassRefPtr<Float64Array> im pl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
205 { 205 {
206 ASSERT(impl); 206 ASSERT(impl);
207 ASSERT(!DOMDataStore::containsWrapper<V8Float64Array>(impl.get(), isolate)); 207 ASSERT(!DOMDataStore::containsWrapper<V8Float64Array>(impl.get(), isolate));
208 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { 208 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
209 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get()); 209 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje ct(impl.get());
210 // Might be a XXXConstructor::info instead of an XXX::info. These will b oth have 210 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper TypeInfo. These will both have
211 // the same object de-ref functions, though, so use that as the basis of the check. 211 // the same object de-ref functions, though, so use that as the basis of the check.
212 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == info.derefObjectFunction); 212 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
213 } 213 }
214 214
215 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &info, toInternalPointer(impl.get()), isolate); 215 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
216 if (UNLIKELY(wrapper.IsEmpty())) 216 if (UNLIKELY(wrapper.IsEmpty()))
217 return wrapper; 217 return wrapper;
218 218
219 impl->buffer()->setDeallocationObserver(V8ArrayBufferDeallocationObserver::i nstance()); 219 impl->buffer()->setDeallocationObserver(V8ArrayBufferDeallocationObserver::i nstance());
220 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 220 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
221 V8DOMWrapper::associateObjectWithWrapper<V8Float64Array>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent); 221 V8DOMWrapper::associateObjectWithWrapper<V8Float64Array>(impl, &wrapperTypeI nfo, wrapper, isolate, WrapperConfiguration::Independent);
222 return wrapper; 222 return wrapper;
223 } 223 }
224 224
225 void V8Float64Array::derefObject(void* object) 225 void V8Float64Array::derefObject(void* object)
226 { 226 {
227 fromInternalPointer(object)->deref(); 227 fromInternalPointer(object)->deref();
228 } 228 }
229 229
230 } // namespace WebCore 230 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8Float64Array.h ('k') | Source/bindings/tests/results/V8SupportTestInterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698