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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp

Issue 900533003: IDL: Support [Unforgeable] on interface definitions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "V8TestInterfaceWillBeGarbageCollected.h" 8 #include "V8TestInterfaceWillBeGarbageCollected.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str); 94 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface WillBeGarbageCollected::create(str);
95 v8::Local<v8::Object> wrapper = info.Holder(); 95 v8::Local<v8::Object> wrapper = info.Holder();
96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper); 96 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC ollected::wrapperTypeInfo, wrapper);
97 v8SetReturnValue(info, wrapper); 97 v8SetReturnValue(info, wrapper);
98 } 98 }
99 99
100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal 100 } // namespace TestInterfaceWillBeGarbageCollectedV8Internal
101 101
102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = { 102 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceWillBeGar bageCollectedAttributes[] = {
103 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pr opertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfig uration::OnInstance}, 103 {"attr1", TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeGette rCallback, TestInterfaceWillBeGarbageCollectedV8Internal::attr1AttributeSetterCa llback, 0, 0, 0, static_cast<v8::AccessControl>(v8::PROHIBITS_OVERWRITING), stat ic_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAll Scripts, V8DOMConfiguration::OnInstance},
104 };
105
106 static const V8DOMConfiguration::MethodConfiguration V8TestInterfaceWillBeGarbag eCollectedMethods[] = {
107 {"func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
108 }; 104 };
109 105
110 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe rTypeInfo::WillBeGarbageCollectedObject }; 106 const WrapperTypeInfo V8TestInterfaceWillBeGarbageCollectedConstructor::wrapperT ypeInfo = { gin::kEmbedderBlink, V8TestInterfaceWillBeGarbageCollectedConstructo r::domTemplate, V8TestInterfaceWillBeGarbageCollected::refObject, V8TestInterfac eWillBeGarbageCollected::derefObject, V8TestInterfaceWillBeGarbageCollected::tra ce, 0, 0, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledMeth ods, V8TestInterfaceWillBeGarbageCollected::installConditionallyEnabledPropertie s, 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassI d, WrapperTypeInfo::InheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe rTypeInfo::WillBeGarbageCollectedObject };
111 107
112 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F unctionCallbackInfo<v8::Value>& info) 108 static void V8TestInterfaceWillBeGarbageCollectedConstructorCallback(const v8::F unctionCallbackInfo<v8::Value>& info)
113 { 109 {
114 if (!info.IsConstructCall()) { 110 if (!info.IsConstructCall()) {
115 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterface")); 111 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterface"));
116 return; 112 return;
117 } 113 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 } 165 }
170 166
171 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate) 167 static void installV8TestInterfaceWillBeGarbageCollectedTemplate(v8::Local<v8::F unctionTemplate> functionTemplate, v8::Isolate* isolate)
172 { 168 {
173 functionTemplate->ReadOnlyPrototype(); 169 functionTemplate->ReadOnlyPrototype();
174 170
175 v8::Local<v8::Signature> defaultSignature; 171 v8::Local<v8::Signature> defaultSignature;
176 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount, 172 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(isolate, func tionTemplate, "TestInterfaceWillBeGarbageCollected", V8EventTarget::domTemplate( isolate), V8TestInterfaceWillBeGarbageCollected::internalFieldCount,
177 V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8Test InterfaceWillBeGarbageCollectedAttributes), 173 V8TestInterfaceWillBeGarbageCollectedAttributes, WTF_ARRAY_LENGTH(V8Test InterfaceWillBeGarbageCollectedAttributes),
178 0, 0, 174 0, 0,
179 V8TestInterfaceWillBeGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInt erfaceWillBeGarbageCollectedMethods)); 175 0, 0);
180 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback); 176 functionTemplate->SetCallHandler(V8TestInterfaceWillBeGarbageCollected::cons tructorCallback);
181 functionTemplate->SetLength(1); 177 functionTemplate->SetLength(1);
182 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 178 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
183 ALLOW_UNUSED_LOCAL(instanceTemplate); 179 ALLOW_UNUSED_LOCAL(instanceTemplate);
184 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 180 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
185 ALLOW_UNUSED_LOCAL(prototypeTemplate); 181 ALLOW_UNUSED_LOCAL(prototypeTemplate);
182 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = {
183 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
184 };
185 V8DOMConfiguration::installMethod(instanceTemplate, defaultSignature, static _cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), funcMethodConfigura tion, isolate);
186 186
187 // Custom toString template 187 // Custom toString template
188 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 188 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
189 } 189 }
190 190
191 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollected::domTempla te(v8::Isolate* isolate) 191 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollected::domTempla te(v8::Isolate* isolate)
192 { 192 {
193 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceWillBeGarbageCollectedTemplate); 193 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceWillBeGarbageCollectedTemplate);
194 } 194 }
195 195
(...skipping 20 matching lines...) Expand all
216 } 216 }
217 217
218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable) 218 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable)
219 { 219 {
220 #if !ENABLE(OILPAN) 220 #if !ENABLE(OILPAN)
221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); 221 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref();
222 #endif 222 #endif
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/core/TestInterfaceWillBeGarbageCollected.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698