| 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 "V8TestException.h" | 7 #include "V8TestException.h" |
| 8 | 8 |
| 9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
| 10 #include "bindings/core/v8/GeneratedCodeHelper.h" | 10 #include "bindings/core/v8/GeneratedCodeHelper.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 70 void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 71 { | 71 { |
| 72 TestExceptionV8Internal::readonlyStringAttributeAttributeGetter(info); | 72 TestExceptionV8Internal::readonlyStringAttributeAttributeGetter(info); |
| 73 } | 73 } |
| 74 | 74 |
| 75 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) | 75 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 TestException* impl = V8TestException::toImpl(info.Holder()); | 77 TestException* impl = V8TestException::toImpl(info.Holder()); |
| 78 |
| 78 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); | 79 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); |
| 79 } | 80 } |
| 80 | 81 |
| 81 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 82 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
| 82 { | 83 { |
| 83 TestExceptionV8Internal::toStringMethod(info); | 84 TestExceptionV8Internal::toStringMethod(info); |
| 84 } | 85 } |
| 85 | 86 |
| 86 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 87 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 87 { | 88 { |
| 88 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestExce
ption", info.Holder(), info.GetIsolate()); | 89 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::Constructio
nContext, "TestException"); |
| 90 |
| 89 if (UNLIKELY(info.Length() < 1)) { | 91 if (UNLIKELY(info.Length() < 1)) { |
| 90 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 92 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 91 return; | 93 return; |
| 92 } | 94 } |
| 95 |
| 93 unsigned argument; | 96 unsigned argument; |
| 94 { | 97 argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, exceptionS
tate); |
| 95 argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, except
ionState); | 98 if (exceptionState.hadException()) |
| 96 if (exceptionState.hadException()) | 99 return; |
| 97 return; | 100 |
| 98 } | |
| 99 TestException* impl = TestException::create(argument); | 101 TestException* impl = TestException::create(argument); |
| 100 v8::Local<v8::Object> wrapper = info.Holder(); | 102 v8::Local<v8::Object> wrapper = info.Holder(); |
| 101 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wr
apperTypeInfo, wrapper); | 103 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wr
apperTypeInfo, wrapper); |
| 102 v8SetReturnValue(info, wrapper); | 104 v8SetReturnValue(info, wrapper); |
| 103 } | 105 } |
| 104 | 106 |
| 105 } // namespace TestExceptionV8Internal | 107 } // namespace TestExceptionV8Internal |
| 106 | 108 |
| 107 const V8DOMConfiguration::AccessorConfiguration V8TestExceptionAccessors[] = { | 109 const V8DOMConfiguration::AccessorConfiguration V8TestExceptionAccessors[] = { |
| 108 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::
PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}, | 110 {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsigned
ShortAttributeAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::
PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOM
Configuration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 { | 165 { |
| 164 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 166 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 165 } | 167 } |
| 166 | 168 |
| 167 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) | 169 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) |
| 168 { | 170 { |
| 169 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 171 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
| 170 } | 172 } |
| 171 | 173 |
| 172 } // namespace blink | 174 } // namespace blink |
| OLD | NEW |