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
3 // found in the LICENSE file.
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
8 #include "V8TestSpecialOperationsIdentifierRaisesException.h"
10 #include "RuntimeEnabledFeatures.h"
11 #include "V8TestInterfaceEmpty.h"
12 #include "bindings/v8/ExceptionState.h"
13 #include "bindings/v8/V8DOMConfiguration.h"
14 #include "bindings/v8/V8HiddenValue.h"
15 #include "bindings/v8/V8ObjectConstructor.h"
16 #include "core/dom/ContextFeatures.h"
17 #include "core/dom/Document.h"
18 #include "platform/TraceEvent.h"
19 #include "wtf/GetPtr.h"
20 #include "wtf/RefPtr.h"
24 static void initializeScriptWrappableForInterface(TestSpecialOperationsIdentifierRaisesException* object)
26 if (ScriptWrappable::wrapperCanBeStoredInObject(object))
27 ScriptWrappable::setTypeInfoInObject(object, &V8TestSpecialOperationsIdentifierRaisesException::wrapperTypeInfo);
32 } // namespace WebCore
34 void webCoreInitializeScriptWrappableForInterface(WebCore::TestSpecialOperationsIdentifierRaisesException* object)
36 WebCore::initializeScriptWrappableForInterface(object);
40 const WrapperTypeInfo V8TestSpecialOperationsIdentifierRaisesException::wrapperTypeInfo = { gin::kEmbedderBlink, V8TestSpecialOperationsIdentifierRaisesException::domTemplate, V8TestSpecialOperationsIdentifierRaisesException::derefObject, 0, 0, 0, V8TestSpecialOperationsIdentifierRaisesException::installPerContextEnabledMethods, 0, WrapperTypeObjectPrototype, false };
42 namespace TestSpecialOperationsIdentifierRaisesExceptionV8Internal {
44 template <typename T> void V8_USE(T) { }
46 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
48 ExceptionState exceptionState(ExceptionState::ExecutionContext, "item", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
49 if (UNLIKELY(info.Length() < 1)) {
50 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
51 exceptionState.throwIfNeeded();
54 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
55 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState), exceptionState);
56 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState);
57 if (exceptionState.throwIfNeeded())
59 v8SetReturnValue(info, result.release());
62 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
64 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
65 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::itemMethod(info);
66 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
69 static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
71 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setItem", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
72 if (UNLIKELY(info.Length() < 2)) {
73 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
74 exceptionState.throwIfNeeded();
77 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
78 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState), exceptionState);
79 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, value, info[1]);
80 String result = impl->setItem(index, value, exceptionState);
81 if (exceptionState.throwIfNeeded())
83 v8SetReturnValueString(info, result, info.GetIsolate());
86 static void setItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
89 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::setItemMethod(info);
90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
93 static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
95 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteItem", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
96 if (UNLIKELY(info.Length() < 1)) {
97 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
98 exceptionState.throwIfNeeded();
101 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
102 V8TRYCATCH_EXCEPTION_VOID(unsigned, index, toUInt32(info[0], exceptionState), exceptionState);
103 bool result = impl->deleteItem(index, exceptionState);
104 if (exceptionState.throwIfNeeded())
106 v8SetReturnValueBool(info, result);
109 static void deleteItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
111 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
112 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteItemMethod(info);
113 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
116 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
118 ExceptionState exceptionState(ExceptionState::ExecutionContext, "namedItem", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
119 if (UNLIKELY(info.Length() < 1)) {
120 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
121 exceptionState.throwIfNeeded();
124 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
125 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
126 RefPtr<TestInterfaceEmpty> result = impl->namedItem(name, exceptionState);
127 if (exceptionState.throwIfNeeded())
129 v8SetReturnValue(info, result.release());
132 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
134 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
135 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedItemMethod(info);
136 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
139 static void setNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
141 ExceptionState exceptionState(ExceptionState::ExecutionContext, "setNamedItem", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
142 if (UNLIKELY(info.Length() < 2)) {
143 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length()));
144 exceptionState.throwIfNeeded();
147 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
148 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
149 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, value, info[1]);
150 String result = impl->setNamedItem(name, value, exceptionState);
151 if (exceptionState.throwIfNeeded())
153 v8SetReturnValueString(info, result, info.GetIsolate());
156 static void setNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
158 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
159 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::setNamedItemMethod(info);
160 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
163 static void deleteNamedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "deleteNamedItem", "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
166 if (UNLIKELY(info.Length() < 1)) {
167 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
168 exceptionState.throwIfNeeded();
171 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
172 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, info[0]);
173 bool result = impl->deleteNamedItem(name, exceptionState);
174 if (exceptionState.throwIfNeeded())
176 v8SetReturnValueBool(info, result);
179 static void deleteNamedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
181 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
182 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteNamedItemMethod(info);
183 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
186 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
188 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
189 ExceptionState exceptionState(ExceptionState::IndexedGetterContext, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
190 RefPtr<TestInterfaceEmpty> result = impl->item(index, exceptionState);
191 if (exceptionState.throwIfNeeded())
195 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl);
198 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
200 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
201 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGetter(index, info);
202 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
205 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
207 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
208 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Value);
209 ExceptionState exceptionState(ExceptionState::IndexedSetterContext, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
210 bool result = impl->setItem(index, propertyValue, exceptionState);
211 if (exceptionState.throwIfNeeded())
215 v8SetReturnValue(info, v8Value);
218 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
221 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertySetter(index, v8Value, info);
222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
225 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
227 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
228 ExceptionState exceptionState(ExceptionState::IndexedDeletionContext, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
229 DeleteResult result = impl->deleteItem(index, exceptionState);
230 if (exceptionState.throwIfNeeded())
232 if (result != DeleteUnknownProperty)
233 return v8SetReturnValueBool(info, result == DeleteSuccess);
236 static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>& info)
238 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMIndexedProperty");
239 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyDeleter(index, info);
240 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
243 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
245 if (info.Holder()->HasRealNamedProperty(name))
247 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
250 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
251 AtomicString propertyName = toCoreAtomicString(name);
252 v8::String::Utf8Value namedProperty(name);
253 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
254 RefPtr<TestInterfaceEmpty> result = impl->namedItem(propertyName, exceptionState);
255 if (exceptionState.throwIfNeeded())
259 v8SetReturnValueFast(info, WTF::getPtr(result.release()), impl);
262 static void namedPropertyGetterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
264 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
265 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGetter(name, info);
266 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
269 static void namedPropertySetter(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
271 if (info.Holder()->HasRealNamedProperty(name))
273 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
276 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
277 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name);
278 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyValue, v8Value);
279 v8::String::Utf8Value namedProperty(name);
280 ExceptionState exceptionState(ExceptionState::SetterContext, *namedProperty, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
281 bool result = impl->setNamedItem(propertyName, propertyValue, exceptionState);
282 if (exceptionState.throwIfNeeded())
286 v8SetReturnValue(info, v8Value);
289 static void namedPropertySetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
291 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
292 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertySetter(name, v8Value, info);
293 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
296 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
298 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
299 AtomicString propertyName = toCoreAtomicString(name);
300 v8::String::Utf8Value namedProperty(name);
301 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
302 bool result = impl->namedPropertyQuery(propertyName, exceptionState);
303 if (exceptionState.throwIfNeeded())
307 v8SetReturnValueInt(info, v8::None);
310 static void namedPropertyQueryCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Integer>& info)
312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
313 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyQuery(name, info);
314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
317 static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
319 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
320 AtomicString propertyName = toCoreAtomicString(name);
321 v8::String::Utf8Value namedProperty(name);
322 ExceptionState exceptionState(ExceptionState::DeletionContext, *namedProperty, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), info.GetIsolate());
323 DeleteResult result = impl->deleteNamedItem(propertyName, exceptionState);
324 if (exceptionState.throwIfNeeded())
326 if (result != DeleteUnknownProperty)
327 return v8SetReturnValueBool(info, result == DeleteSuccess);
330 static void namedPropertyDeleterCallback(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Boolean>& info)
332 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
333 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyDeleter(name, info);
334 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
337 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& info)
339 TestSpecialOperationsIdentifierRaisesException* impl = V8TestSpecialOperationsIdentifierRaisesException::toNative(info.Holder());
340 v8::Isolate* isolate = info.GetIsolate();
341 Vector<String> names;
342 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestSpecialOperationsIdentifierRaisesException", info.Holder(), isolate);
343 impl->namedPropertyEnumerator(names, exceptionState);
344 if (exceptionState.throwIfNeeded())
346 v8::Handle<v8::Array> v8names = v8::Array::New(isolate, names.size());
347 for (size_t i = 0; i < names.size(); ++i)
348 v8names->Set(v8::Integer::New(isolate, i), v8String(isolate, names[i]));
349 v8SetReturnValue(info, v8names);
352 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>& info)
354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMNamedProperty");
355 TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyEnumerator(info);
356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
359 } // namespace TestSpecialOperationsIdentifierRaisesExceptionV8Internal
361 static const V8DOMConfiguration::MethodConfiguration V8TestSpecialOperationsIdentifierRaisesExceptionMethods[] = {
362 {"item", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::itemMethodCallback, 0, 1},
363 {"setItem", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::setItemMethodCallback, 0, 2},
364 {"deleteItem", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteItemMethodCallback, 0, 1},
365 {"namedItem", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedItemMethodCallback, 0, 1},
366 {"setNamedItem", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::setNamedItemMethodCallback, 0, 2},
367 {"deleteNamedItem", TestSpecialOperationsIdentifierRaisesExceptionV8Internal::deleteNamedItemMethodCallback, 0, 1},
370 static void configureV8TestSpecialOperationsIdentifierRaisesExceptionTemplate(v8::Handle<v8::FunctionTemplate> functionTemplate, v8::Isolate* isolate)
372 functionTemplate->ReadOnlyPrototype();
374 v8::Local<v8::Signature> defaultSignature;
375 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTemplate, "TestSpecialOperationsIdentifierRaisesException", v8::Local<v8::FunctionTemplate>(), V8TestSpecialOperationsIdentifierRaisesException::internalFieldCount,
378 V8TestSpecialOperationsIdentifierRaisesExceptionMethods, WTF_ARRAY_LENGTH(V8TestSpecialOperationsIdentifierRaisesExceptionMethods),
380 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTemplate->InstanceTemplate();
381 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTemplate->PrototypeTemplate();
382 functionTemplate->InstanceTemplate()->SetIndexedPropertyHandler(TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyGetterCallback, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertySetterCallback, 0, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestSpecialOperationsIdentifierRaisesException>);
383 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyGetterCallback, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertySetterCallback, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyQueryCallback, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyDeleterCallback, TestSpecialOperationsIdentifierRaisesExceptionV8Internal::namedPropertyEnumeratorCallback);
385 // Custom toString template
386 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::current()->toStringTemplate());
389 v8::Handle<v8::FunctionTemplate> V8TestSpecialOperationsIdentifierRaisesException::domTemplate(v8::Isolate* isolate)
391 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
392 v8::Local<v8::FunctionTemplate> result = data->existingDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo));
393 if (!result.IsEmpty())
396 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate");
397 result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
398 configureV8TestSpecialOperationsIdentifierRaisesExceptionTemplate(result, isolate);
399 data->setDOMTemplate(const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), result);
403 bool V8TestSpecialOperationsIdentifierRaisesException::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
405 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
408 v8::Handle<v8::Object> V8TestSpecialOperationsIdentifierRaisesException::findInstanceInPrototypeChain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
410 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
413 TestSpecialOperationsIdentifierRaisesException* V8TestSpecialOperationsIdentifierRaisesException::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
415 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
418 v8::Handle<v8::Object> V8TestSpecialOperationsIdentifierRaisesException::createWrapper(PassRefPtr<TestSpecialOperationsIdentifierRaisesException> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
421 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperationsIdentifierRaisesException>(impl.get(), isolate));
422 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
423 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
424 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperTypeInfo. These will both have
425 // the same object de-ref functions, though, so use that as the basis of the check.
426 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
429 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
430 if (UNLIKELY(wrapper.IsEmpty()))
433 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
434 V8DOMWrapper::associateObjectWithWrapper<V8TestSpecialOperationsIdentifierRaisesException>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
438 void V8TestSpecialOperationsIdentifierRaisesException::derefObject(void* object)
440 fromInternalPointer(object)->deref();
444 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperationsIdentifierRaisesException* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
446 return toV8(impl, creationContext, isolate);
449 } // namespace WebCore