| OLD | NEW |
| 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 V8StringResource<> str; | 127 V8StringResource<> str; |
| 128 { | 128 { |
| 129 TOSTRING_VOID_INTERNAL(str, info[0]); | 129 TOSTRING_VOID_INTERNAL(str, info[0]); |
| 130 } | 130 } |
| 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); | 131 RefPtrWillBeRawPtr<TestInterfaceWillBeGarbageCollected> impl = TestInterface
WillBeGarbageCollected::createForJSConstructor(str); |
| 132 v8::Local<v8::Object> wrapper = info.Holder(); | 132 v8::Local<v8::Object> wrapper = info.Holder(); |
| 133 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); | 133 impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceWillBeGarbageC
ollectedConstructor::wrapperTypeInfo, wrapper); |
| 134 v8SetReturnValue(info, wrapper); | 134 v8SetReturnValue(info, wrapper); |
| 135 } | 135 } |
| 136 | 136 |
| 137 v8::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructo
r::domTemplate(v8::Isolate* isolate) | 137 v8::Local<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollectedConstructor
::domTemplate(v8::Isolate* isolate) |
| 138 { | 138 { |
| 139 static int domTemplateKey; // This address is used for a key to look up the
dom template. | 139 static int domTemplateKey; // This address is used for a key to look up the
dom template. |
| 140 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 140 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 141 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); | 141 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(&domTempl
ateKey); |
| 142 if (!result.IsEmpty()) | 142 if (!result.IsEmpty()) |
| 143 return result; | 143 return result; |
| 144 | 144 |
| 145 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); | 145 TRACE_EVENT_SCOPED_SAMPLING_STATE("blink", "BuildDOMTemplate"); |
| 146 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceWillBeGarbageColl
ectedConstructorCallback); | 146 result = v8::FunctionTemplate::New(isolate, V8TestInterfaceWillBeGarbageColl
ectedConstructorCallback); |
| 147 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); | 147 v8::Local<v8::ObjectTemplate> instanceTemplate = result->InstanceTemplate(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 functionTemplate->SetLength(1); | 181 functionTemplate->SetLength(1); |
| 182 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); | 182 v8::Local<v8::ObjectTemplate> instanceTemplate = functionTemplate->InstanceT
emplate(); |
| 183 ALLOW_UNUSED_LOCAL(instanceTemplate); | 183 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 184 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); | 184 v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->Prototyp
eTemplate(); |
| 185 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 185 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 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::Handle<v8::FunctionTemplate> V8TestInterfaceWillBeGarbageCollected::domTempl
ate(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 |
| 196 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Handle<v8::Value> v8
Value, v8::Isolate* isolate) | 196 bool V8TestInterfaceWillBeGarbageCollected::hasInstance(v8::Handle<v8::Value> v8
Value, v8::Isolate* isolate) |
| 197 { | 197 { |
| 198 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 198 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 199 } | 199 } |
| 200 | 200 |
| 201 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 201 v8::Handle<v8::Object> V8TestInterfaceWillBeGarbageCollected::findInstanceInProt
otypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 |
| OLD | NEW |