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

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

Issue 14244017: Make length property return useful values for DOM bindings functions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Replace [Optional] by optional Created 7 years, 8 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 This file is part of the WebKit open source project. 2 This file is part of the WebKit open source project.
3 This file has been generated by generate-bindings.pl. DO NOT MODIFY! 3 This file has been generated by generate-bindings.pl. 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,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 */ 19 */
20 20
21 #include "config.h" 21 #include "config.h"
22 #include "V8TestNode.h" 22 #include "V8TestNode.h"
23 23
24 #include "BindingState.h" 24 #include "BindingState.h"
25 #include "ContextFeatures.h" 25 #include "ContextFeatures.h"
26 #include "Frame.h" 26 #include "Frame.h"
27 #include "RuntimeEnabledFeatures.h" 27 #include "RuntimeEnabledFeatures.h"
28 #include "ScriptController.h"
28 #include "V8Binding.h" 29 #include "V8Binding.h"
29 #include "V8DOMWrapper.h" 30 #include "V8DOMWrapper.h"
30 #include "V8Node.h" 31 #include "V8Node.h"
31 #include <wtf/UnusedParam.h> 32 #include <wtf/UnusedParam.h>
32 33
33 #if ENABLE(BINDING_INTEGRITY) 34 #if ENABLE(BINDING_INTEGRITY)
34 #if defined(OS_WIN) 35 #if defined(OS_WIN)
35 #pragma warning(disable: 4483) 36 #pragma warning(disable: 4483)
36 extern "C" { extern void (*const __identifier("??_7TestNode@WebCore@@6B@")[])(); } 37 extern "C" { extern void (*const __identifier("??_7TestNode@WebCore@@6B@")[])(); }
37 #else 38 #else
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Pers istent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType) 97 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Pers istent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType curren tWorldType)
97 { 98 {
98 desc->ReadOnlyPrototype(); 99 desc->ReadOnlyPrototype();
99 100
100 v8::Local<v8::Signature> defaultSignature; 101 v8::Local<v8::Signature> defaultSignature;
101 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V 8Node::GetTemplate(isolate, currentWorldType), V8TestNode::internalFieldCount, 102 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V 8Node::GetTemplate(isolate, currentWorldType), V8TestNode::internalFieldCount,
102 0, 0, 103 0, 0,
103 0, 0, isolate, currentWorldType); 104 0, 0, isolate, currentWorldType);
104 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 105 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
105 desc->SetCallHandler(V8TestNode::constructorCallback); 106 desc->SetCallHandler(V8TestNode::constructorCallback);
107 desc->SetLength(0);
106 108
107 // Custom toString template 109 // Custom toString template
108 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate()); 110 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to StringTemplate());
109 return desc; 111 return desc;
110 } 112 }
111 113
112 v8::Persistent<v8::FunctionTemplate> V8TestNode::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType) 114 v8::Persistent<v8::FunctionTemplate> V8TestNode::GetTemplate(v8::Isolate* isolat e, WrapperWorldType currentWorldType)
113 { 115 {
114 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 116 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
115 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info); 117 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo rldType).find(&info);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 installPerContextProperties(wrapper, impl.get(), isolate); 160 installPerContextProperties(wrapper, impl.get(), isolate);
159 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep endent); 161 V8DOMWrapper::associateObjectWithWrapper(impl, &info, wrapper, isolate, hasD ependentLifetime ? WrapperConfiguration::Dependent : WrapperConfiguration::Indep endent);
160 return wrapper; 162 return wrapper;
161 } 163 }
162 void V8TestNode::derefObject(void* object) 164 void V8TestNode::derefObject(void* object)
163 { 165 {
164 static_cast<TestNode*>(object)->deref(); 166 static_cast<TestNode*>(object)->deref();
165 } 167 }
166 168
167 } // namespace WebCore 169 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestNamedConstructor.cpp ('k') | Source/bindings/tests/results/V8TestObj.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698