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

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

Issue 1017733003: [DO NOT LAND] Set @@toStringTag for DOM object prototypes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More test rebaselines Created 5 years, 9 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 // 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 static int domTemplateKey; // This address is used for a key to look up the dom template. 140 static int domTemplateKey; // This address is used for a key to look up the dom template.
141 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 141 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
142 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey); 142 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl ateKey);
143 if (!result.IsEmpty()) 143 if (!result.IsEmpty())
144 return result; 144 return result;
145 145
146 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); 146 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate");
147 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceWillBeGarbageColl ectedConstructorCallback); 147 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceWillBeGarbageColl ectedConstructorCallback);
148 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); 148 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate();
149 instanceTemplate->SetInternalFieldCount(V8TestInterfaceWillBeGarbageCollecte d::internalFieldCount); 149 instanceTemplate->SetInternalFieldCount(V8TestInterfaceWillBeGarbageCollecte d::internalFieldCount);
150 result->SetClassName(v8AtomicString(isolate, "TestInterfaceWillBeGarbageColl ected")); 150 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is olate, "TestInterfaceWillBeGarbageCollected"));
151 result->Inherit(V8TestInterfaceWillBeGarbageCollected::domTemplate(isolate)) ; 151 result->Inherit(V8TestInterfaceWillBeGarbageCollected::domTemplate(isolate)) ;
152 data->setDOMTemplate(&domTemplateKey, result); 152 data->setDOMTemplate(&domTemplateKey, result);
153 return result; 153 return result;
154 } 154 }
155 155
156 void V8TestInterfaceWillBeGarbageCollected::constructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 156 void V8TestInterfaceWillBeGarbageCollected::constructorCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
157 { 157 {
158 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor"); 158 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "DOMConstructor");
159 if (!info.IsConstructCall()) { 159 if (!info.IsConstructCall()) {
160 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceWillBeGarbageCollected")); 160 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c onstructorNotCallableAsFunction("TestInterfaceWillBeGarbageCollected"));
(...skipping 21 matching lines...) Expand all
182 functionTemplate->SetLength(1); 182 functionTemplate->SetLength(1);
183 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate(); 183 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT emplate();
184 ALLOW_UNUSED_LOCAL(instanceTemplate); 184 ALLOW_UNUSED_LOCAL(instanceTemplate);
185 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate(); 185 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp eTemplate();
186 ALLOW_UNUSED_LOCAL(prototypeTemplate); 186 ALLOW_UNUSED_LOCAL(prototypeTemplate);
187 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = { 187 const V8DOMConfiguration::MethodConfiguration funcMethodConfiguration = {
188 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts, 188 "func", TestInterfaceWillBeGarbageCollectedV8Internal::funcMethodCallbac k, 0, 1, V8DOMConfiguration::ExposedToAllScripts,
189 }; 189 };
190 V8DOMConfiguration::installMethod(isolate, instanceTemplate, defaultSignatur e, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), funcMethod Configuration); 190 V8DOMConfiguration::installMethod(isolate, instanceTemplate, defaultSignatur e, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), funcMethod Configuration);
191 191
192 instanceTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(is olate, "TestInterfaceWillBeGarbageCollected"));
193
194 prototypeTemplate->Set(v8::Symbol::GetToStringTag(isolate), v8AtomicString(i solate, "TestInterfaceWillBeGarbageCollectedPrototype"));
195
192 // Custom toString template 196 // Custom toString template
193 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 197 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
194 } 198 }
195 199
196 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollected::domTempla te(v8::Isolate* isolate) 200 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollected::domTempla te(v8::Isolate* isolate)
197 { 201 {
198 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceWillBeGarbageCollectedTemplate); 202 return V8DOMConfiguration::domClassTemplate(isolate, const_cast<WrapperTypeI nfo*>(&wrapperTypeInfo), installV8TestInterfaceWillBeGarbageCollectedTemplate);
199 } 203 }
200 204
201 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Local<v8::Value> v8V alue, v8::Isolate* isolate) 205 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Local<v8::Value> v8V alue, v8::Isolate* isolate)
(...skipping 19 matching lines...) Expand all
221 } 225 }
222 226
223 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable) 227 void V8TestInterfaceWillBeGarbageCollected::derefObject(ScriptWrappable* scriptW rappable)
224 { 228 {
225 #if !ENABLE(OILPAN) 229 #if !ENABLE(OILPAN)
226 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref(); 230 scriptWrappable->toImpl<TestInterfaceWillBeGarbageCollected>()->deref();
227 #endif 231 #endif
228 } 232 }
229 233
230 } // namespace blink 234 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698