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 "V8TestException.h" | 8 #include "V8TestException.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // bindings/core/v8/ScriptWrappable.h. | 41 // bindings/core/v8/ScriptWrappable.h. |
42 const WrapperTypeInfo& TestException::s_wrapperTypeInfo = V8TestException::wrapp
erTypeInfo; | 42 const WrapperTypeInfo& TestException::s_wrapperTypeInfo = V8TestException::wrapp
erTypeInfo; |
43 | 43 |
44 namespace TestExceptionV8Internal { | 44 namespace TestExceptionV8Internal { |
45 | 45 |
46 template <typename T> void V8_USE(T) { } | 46 template <typename T> void V8_USE(T) { } |
47 | 47 |
48 static void readonlyUnsignedShortAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) | 48 static void readonlyUnsignedShortAttributeAttributeGetter(const v8::PropertyCall
backInfo<v8::Value>& info) |
49 { | 49 { |
50 v8::Handle<v8::Object> holder = info.Holder(); | 50 v8::Handle<v8::Object> holder = info.Holder(); |
51 TestException* impl = V8TestException::toNative(holder); | 51 TestException* impl = V8TestException::toImpl(holder); |
52 v8SetReturnValueUnsigned(info, impl->readonlyUnsignedShortAttribute()); | 52 v8SetReturnValueUnsigned(info, impl->readonlyUnsignedShortAttribute()); |
53 } | 53 } |
54 | 54 |
55 static void readonlyUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 55 static void readonlyUnsignedShortAttributeAttributeGetterCallback(v8::Local<v8::
String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
56 { | 56 { |
57 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 57 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
58 TestExceptionV8Internal::readonlyUnsignedShortAttributeAttributeGetter(info)
; | 58 TestExceptionV8Internal::readonlyUnsignedShortAttributeAttributeGetter(info)
; |
59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 59 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
60 } | 60 } |
61 | 61 |
62 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) | 62 static void readonlyStringAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
63 { | 63 { |
64 v8::Handle<v8::Object> holder = info.Holder(); | 64 v8::Handle<v8::Object> holder = info.Holder(); |
65 TestException* impl = V8TestException::toNative(holder); | 65 TestException* impl = V8TestException::toImpl(holder); |
66 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); | 66 v8SetReturnValueString(info, impl->readonlyStringAttribute(), info.GetIsolat
e()); |
67 } | 67 } |
68 | 68 |
69 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 69 static void readonlyStringAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
70 { | 70 { |
71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 71 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
72 TestExceptionV8Internal::readonlyStringAttributeAttributeGetter(info); | 72 TestExceptionV8Internal::readonlyStringAttributeAttributeGetter(info); |
73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 73 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
74 } | 74 } |
75 | 75 |
76 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 76 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
77 { | 77 { |
78 TestException* impl = V8TestException::toNative(info.Holder()); | 78 TestException* impl = V8TestException::toImpl(info.Holder()); |
79 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 79 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
80 } | 80 } |
81 | 81 |
82 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 82 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
83 { | 83 { |
84 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 84 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
85 TestExceptionV8Internal::toStringMethod(info); | 85 TestExceptionV8Internal::toStringMethod(info); |
86 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 86 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
87 } | 87 } |
88 | 88 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 bool V8TestException::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is
olate) | 126 bool V8TestException::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* is
olate) |
127 { | 127 { |
128 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 128 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
129 } | 129 } |
130 | 130 |
131 v8::Handle<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) | 131 v8::Handle<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) |
132 { | 132 { |
133 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 133 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
134 } | 134 } |
135 | 135 |
136 TestException* V8TestException::toNativeWithTypeCheck(v8::Isolate* isolate, v8::
Handle<v8::Value> value) | 136 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Ha
ndle<v8::Value> value) |
137 { | 137 { |
138 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 138 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestException>() : 0; |
139 } | 139 } |
140 | 140 |
141 | 141 |
142 void V8TestException::refObject(ScriptWrappableBase* internalPointer) | 142 void V8TestException::refObject(ScriptWrappableBase* internalPointer) |
143 { | 143 { |
144 fromInternalPointer(internalPointer)->ref(); | 144 internalPointer->toImpl<TestException>()->ref(); |
145 } | 145 } |
146 | 146 |
147 void V8TestException::derefObject(ScriptWrappableBase* internalPointer) | 147 void V8TestException::derefObject(ScriptWrappableBase* internalPointer) |
148 { | 148 { |
149 fromInternalPointer(internalPointer)->deref(); | 149 internalPointer->toImpl<TestException>()->deref(); |
150 } | 150 } |
151 | 151 |
152 WrapperPersistentNode* V8TestException::createPersistentHandle(ScriptWrappableBa
se* internalPointer) | 152 WrapperPersistentNode* V8TestException::createPersistentHandle(ScriptWrappableBa
se* internalPointer) |
153 { | 153 { |
154 ASSERT_NOT_REACHED(); | 154 ASSERT_NOT_REACHED(); |
155 return 0; | 155 return 0; |
156 } | 156 } |
157 | 157 |
158 template<> | 158 template<> |
159 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 159 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
160 { | 160 { |
161 return toV8(impl, creationContext, isolate); | 161 return toV8(impl, creationContext, isolate); |
162 } | 162 } |
163 | 163 |
164 } // namespace blink | 164 } // namespace blink |
OLD | NEW |