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 "V8TestInterfaceConstructor3.h" | 7 #include "V8TestInterfaceConstructor3.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 decltype(&ScriptWrappable::hasPendingActivity)>::value, | 44 decltype(&ScriptWrappable::hasPendingActivity)>::value, |
45 "TestInterfaceConstructor3 is overriding hasPendingActivity(), but is not sp
ecifying " | 45 "TestInterfaceConstructor3 is overriding hasPendingActivity(), but is not sp
ecifying " |
46 "[ActiveScriptWrappable] extended attribute in the IDL file. " | 46 "[ActiveScriptWrappable] extended attribute in the IDL file. " |
47 "Be consistent."); | 47 "Be consistent."); |
48 | 48 |
49 namespace TestInterfaceConstructor3V8Internal { | 49 namespace TestInterfaceConstructor3V8Internal { |
50 | 50 |
51 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 51 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
52 { | 52 { |
53 if (UNLIKELY(info.Length() < 1)) { | 53 if (UNLIKELY(info.Length() < 1)) { |
54 V8ThrowException::throwException(info.GetIsolate(), V8ThrowException::cr
eateTypeError(info.GetIsolate(), ExceptionMessages::failedToConstruct("TestInter
faceConstructor3", ExceptionMessages::notEnoughArguments(1, info.Length())))); | 54 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToConstruct("TestInterfaceConstructor3", ExceptionMessages::notEnoughArgume
nts(1, info.Length()))); |
55 return; | 55 return; |
56 } | 56 } |
| 57 |
57 V8StringResource<> stringArg; | 58 V8StringResource<> stringArg; |
58 { | 59 stringArg = info[0]; |
59 stringArg = info[0]; | 60 if (!stringArg.prepare()) |
60 if (!stringArg.prepare()) | 61 return; |
61 return; | 62 |
62 } | |
63 TestInterfaceConstructor3* impl = TestInterfaceConstructor3::create(stringAr
g); | 63 TestInterfaceConstructor3* impl = TestInterfaceConstructor3::create(stringAr
g); |
64 v8::Local<v8::Object> wrapper = info.Holder(); | 64 v8::Local<v8::Object> wrapper = info.Holder(); |
65 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons
tructor3::wrapperTypeInfo, wrapper); | 65 wrapper = impl->associateWithWrapper(info.GetIsolate(), &V8TestInterfaceCons
tructor3::wrapperTypeInfo, wrapper); |
66 v8SetReturnValue(info, wrapper); | 66 v8SetReturnValue(info, wrapper); |
67 } | 67 } |
68 | 68 |
69 } // namespace TestInterfaceConstructor3V8Internal | 69 } // namespace TestInterfaceConstructor3V8Internal |
70 | 70 |
71 void V8TestInterfaceConstructor3::constructorCallback(const v8::FunctionCallback
Info<v8::Value>& info) | 71 void V8TestInterfaceConstructor3::constructorCallback(const v8::FunctionCallback
Info<v8::Value>& info) |
72 { | 72 { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 { | 112 { |
113 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 113 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
114 } | 114 } |
115 | 115 |
116 TestInterfaceConstructor3* V8TestInterfaceConstructor3::toImplWithTypeCheck(v8::
Isolate* isolate, v8::Local<v8::Value> value) | 116 TestInterfaceConstructor3* V8TestInterfaceConstructor3::toImplWithTypeCheck(v8::
Isolate* isolate, v8::Local<v8::Value> value) |
117 { | 117 { |
118 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; | 118 return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(valu
e)) : nullptr; |
119 } | 119 } |
120 | 120 |
121 } // namespace blink | 121 } // namespace blink |
OLD | NEW |