| 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. | 5 // This file has been auto-generated by code_generator_v8.py. |
| 6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
| 7 | 7 |
| 8 // clang-format off | 8 // clang-format off |
| 9 #include "V8TestException.h" | 9 #include "V8TestException.h" |
| 10 | 10 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 TestException* impl = TestException::create(argument); | 100 TestException* impl = TestException::create(argument); |
| 101 v8::Local<v8::Object> wrapper = info.Holder(); | 101 v8::Local<v8::Object> wrapper = info.Holder(); |
| 102 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wrap
perTypeInfo, wrapper); | 102 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wrap
perTypeInfo, wrapper); |
| 103 v8SetReturnValue(info, wrapper); | 103 v8SetReturnValue(info, wrapper); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace TestExceptionV8Internal | 106 } // namespace TestExceptionV8Internal |
| 107 | 107 |
| 108 const V8DOMConfiguration::AccessorConfiguration V8TestExceptionAccessors[] = { | 108 const V8DOMConfiguration::AccessorConfiguration V8TestExceptionAccessors[] = { |
| 109 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_
cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScrip
ts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 109 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_
cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DO
MConfiguration::CheckHolder}, |
| 110 {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttribute
AttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::Prope
rtyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfi
guration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 110 {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttribute
AttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::Prope
rtyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration
::CheckHolder}, |
| 111 }; | 111 }; |
| 112 | 112 |
| 113 const V8DOMConfiguration::MethodConfiguration V8TestExceptionMethods[] = { | 113 const V8DOMConfiguration::MethodConfiguration V8TestExceptionMethods[] = { |
| 114 {"toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0, static_c
ast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScript
s, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 114 {"toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0, static_c
ast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOM
Configuration::CheckHolder}, |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 void V8TestException::constructorCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { | 117 void V8TestException::constructorCallback(const v8::FunctionCallbackInfo<v8::Val
ue>& info) { |
| 118 if (!info.IsConstructCall()) { | 118 if (!info.IsConstructCall()) { |
| 119 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::const
ructorNotCallableAsFunction("TestException")); | 119 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::const
ructorNotCallableAsFunction("TestException")); |
| 120 return; | 120 return; |
| 121 } | 121 } |
| 122 | 122 |
| 123 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExisti
ngObject) { | 123 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExisti
ngObject) { |
| 124 v8SetReturnValue(info, info.Holder()); | 124 v8SetReturnValue(info, info.Holder()); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 v8::Local<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Local<v8
::Value> v8Value, v8::Isolate* isolate) { | 160 v8::Local<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Local<v8
::Value> v8Value, v8::Isolate* isolate) { |
| 161 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); | 161 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperT
ypeInfo, v8Value); |
| 162 } | 162 } |
| 163 | 163 |
| 164 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) { | 164 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) { |
| 165 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; | 165 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)
) : nullptr; |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |