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/V8DOMConfiguration.h" | 10 #include "bindings/core/v8/V8DOMConfiguration.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | 80 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in
fo) |
81 { | 81 { |
82 TestExceptionV8Internal::toStringMethod(info); | 82 TestExceptionV8Internal::toStringMethod(info); |
83 } | 83 } |
84 | 84 |
85 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 85 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
86 { | 86 { |
87 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestExce
ption", info.Holder(), info.GetIsolate()); | 87 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestExce
ption", info.Holder(), info.GetIsolate()); |
88 if (UNLIKELY(info.Length() < 1)) { | 88 if (UNLIKELY(info.Length() < 1)) { |
89 setMinimumArityTypeError(exceptionState, 1, info.Length()); | 89 setMinimumArityTypeError(exceptionState, 1, info.Length()); |
90 exceptionState.throwIfNeeded(); | |
91 return; | 90 return; |
92 } | 91 } |
93 unsigned argument; | 92 unsigned argument; |
94 { | 93 { |
95 argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, except
ionState); | 94 argument = toUInt16(info.GetIsolate(), info[0], NormalConversion, except
ionState); |
96 if (exceptionState.throwIfNeeded()) | 95 if (exceptionState.hadException()) |
97 return; | 96 return; |
98 } | 97 } |
99 TestException* impl = TestException::create(argument); | 98 TestException* impl = TestException::create(argument); |
100 v8::Local<v8::Object> wrapper = info.Holder(); | 99 v8::Local<v8::Object> wrapper = info.Holder(); |
101 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wr
apperTypeInfo, wrapper); | 100 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestException::wr
apperTypeInfo, wrapper); |
102 v8SetReturnValue(info, wrapper); | 101 v8SetReturnValue(info, wrapper); |
103 } | 102 } |
104 | 103 |
105 } // namespace TestExceptionV8Internal | 104 } // namespace TestExceptionV8Internal |
106 | 105 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 { | 162 { |
164 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 163 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
165 } | 164 } |
166 | 165 |
167 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) | 166 TestException* V8TestException::toImplWithTypeCheck(v8::Isolate* isolate, v8::Lo
cal<v8::Value> value) |
168 { | 167 { |
169 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 168 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
170 } | 169 } |
171 | 170 |
172 } // namespace blink | 171 } // namespace blink |
OLD | NEW |