| 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 // clang-format off | 7 // clang-format off |
| 8 #include "V8TestInterfacePartial.h" | 8 #include "V8TestInterfacePartial.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "core/origin_trials/OriginTrials.h" | 24 #include "core/origin_trials/OriginTrials.h" |
| 25 #include "platform/RuntimeEnabledFeatures.h" | 25 #include "platform/RuntimeEnabledFeatures.h" |
| 26 #include "platform/ScriptForbiddenScope.h" | 26 #include "platform/ScriptForbiddenScope.h" |
| 27 #include "wtf/GetPtr.h" | 27 #include "wtf/GetPtr.h" |
| 28 #include "wtf/RefPtr.h" | 28 #include "wtf/RefPtr.h" |
| 29 | 29 |
| 30 namespace blink { | 30 namespace blink { |
| 31 | 31 |
| 32 namespace TestInterfaceImplementationPartialV8Internal { | 32 namespace TestInterfaceImplementationPartialV8Internal { |
| 33 | 33 |
| 34 static void partial4LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) | 34 static void partial4LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<
v8::Value>& info) { |
| 35 { | 35 v8::Local<v8::Object> holder = info.Holder(); |
| 36 v8::Local<v8::Object> holder = info.Holder(); | 36 |
| 37 | 37 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 38 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 38 |
| 39 | 39 v8SetReturnValueInt(info, TestInterfacePartial4::partial4LongAttribute(*impl))
; |
| 40 v8SetReturnValueInt(info, TestInterfacePartial4::partial4LongAttribute(*impl
)); | 40 } |
| 41 } | 41 |
| 42 | 42 void partial4LongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 43 void partial4LongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 43 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeGe
tter(info); |
| 44 { | 44 } |
| 45 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Getter(info); | 45 |
| 46 } | 46 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) { |
| 47 | 47 v8::Local<v8::Object> holder = info.Holder(); |
| 48 static void partial4LongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c
onst v8::FunctionCallbackInfo<v8::Value>& info) | 48 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 49 { | 49 |
| 50 v8::Local<v8::Object> holder = info.Holder(); | 50 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface", "partial4LongAttribute"); |
| 51 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 51 |
| 52 | 52 // Prepare the value to be set. |
| 53 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterConte
xt, "TestInterface", "partial4LongAttribute"); | 53 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); |
| 54 | 54 if (exceptionState.hadException()) |
| 55 // Prepare the value to be set. | 55 return; |
| 56 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 56 |
| 57 if (exceptionState.hadException()) | 57 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue); |
| 58 return; | 58 } |
| 59 | 59 |
| 60 TestInterfacePartial4::setPartial4LongAttribute(*impl, cppValue); | 60 void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 61 } | 61 v8::Local<v8::Value> v8Value = info[0]; |
| 62 | 62 |
| 63 void partial4LongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 63 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSe
tter(v8Value, info); |
| 64 { | 64 } |
| 65 v8::Local<v8::Value> v8Value = info[0]; | 65 |
| 66 | 66 static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
| 67 TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttribute
Setter(v8Value, info); | 67 v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute()
); |
| 68 } | 68 } |
| 69 | 69 |
| 70 static void partial4StaticLongAttributeAttributeGetter(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 70 void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
| 71 { | 71 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri
buteGetter(info); |
| 72 v8SetReturnValueInt(info, TestInterfacePartial4::partial4StaticLongAttribute
()); | 72 } |
| 73 } | 73 |
| 74 | 74 static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 75 void partial4StaticLongAttributeAttributeGetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 75 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext
, "TestInterface", "partial4StaticLongAttribute"); |
| 76 { | 76 |
| 77 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAtt
ributeGetter(info); | 77 // Prepare the value to be set. |
| 78 } | 78 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exception
State); |
| 79 | 79 if (exceptionState.hadException()) |
| 80 static void partial4StaticLongAttributeAttributeSetter(v8::Local<v8::Value> v8Va
lue, const v8::FunctionCallbackInfo<v8::Value>& info) | 80 return; |
| 81 { | 81 |
| 82 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterConte
xt, "TestInterface", "partial4StaticLongAttribute"); | 82 TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue); |
| 83 | 83 } |
| 84 // Prepare the value to be set. | 84 |
| 85 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti
onState); | 85 void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) { |
| 86 if (exceptionState.hadException()) | 86 v8::Local<v8::Value> v8Value = info[0]; |
| 87 return; | 87 |
| 88 | 88 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttri
buteSetter(v8Value, info); |
| 89 TestInterfacePartial4::setPartial4StaticLongAttribute(cppValue); | 89 } |
| 90 } | 90 |
| 91 | 91 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
| 92 void partial4StaticLongAttributeAttributeSetterCallback(const v8::FunctionCallba
ckInfo<v8::Value>& info) | 92 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 93 { | 93 |
| 94 v8::Local<v8::Value> v8Value = info[0]; | 94 V8StringResource<> value; |
| 95 | 95 value = info[0]; |
| 96 TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAtt
ributeSetter(v8Value, info); | 96 if (!value.prepare()) |
| 97 } | 97 return; |
| 98 | 98 |
| 99 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8::
Value>& info) | 99 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value); |
| 100 { | 100 } |
| 101 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 101 |
| 102 | 102 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 103 V8StringResource<> value; | 103 bool isArityError = false; |
| 104 value = info[0]; | 104 switch (std::min(1, info.Length())) { |
| 105 if (!value.prepare()) | 105 case 0: |
| 106 return; | 106 break; |
| 107 | 107 case 1: |
| 108 TestInterfacePartial3Implementation::voidMethodPartialOverload(*impl, value)
; | 108 if (true) { |
| 109 } | 109 voidMethodPartialOverload3Method(info); |
| 110 | 110 return; |
| 111 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 111 } |
| 112 { | 112 break; |
| 113 bool isArityError = false; | 113 default: |
| 114 switch (std::min(1, info.Length())) { | 114 isArityError = true; |
| 115 case 0: | 115 } |
| 116 break; | 116 |
| 117 case 1: | 117 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "voidMethodPartialOverload"); |
| 118 if (true) { | 118 |
| 119 voidMethodPartialOverload3Method(info); | 119 if (isArityError) { |
| 120 return; | 120 } |
| 121 } | 121 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 122 break; | 122 } |
| 123 default: | 123 |
| 124 isArityError = true; | 124 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) { |
| 125 } | 125 V8StringResource<> value; |
| 126 | 126 value = info[0]; |
| 127 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "voidMethodPartialOverload"); | 127 if (!value.prepare()) |
| 128 | 128 return; |
| 129 if (isArityError) { | 129 |
| 130 } | 130 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); |
| 131 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 131 } |
| 132 } | 132 |
| 133 | 133 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) { |
| 134 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf
o<v8::Value>& info) | 134 bool isArityError = false; |
| 135 { | 135 switch (std::min(1, info.Length())) { |
| 136 V8StringResource<> value; | 136 case 0: |
| 137 value = info[0]; | 137 break; |
| 138 if (!value.prepare()) | 138 case 1: |
| 139 return; | 139 if (true) { |
| 140 | 140 staticVoidMethodPartialOverload2Method(info); |
| 141 TestInterfacePartial3Implementation::staticVoidMethodPartialOverload(value); | 141 return; |
| 142 } | 142 } |
| 143 | 143 break; |
| 144 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 144 default: |
| 145 { | 145 isArityError = true; |
| 146 bool isArityError = false; | 146 } |
| 147 switch (std::min(1, info.Length())) { | 147 |
| 148 case 0: | 148 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "staticVoidMethodPartialOverload"); |
| 149 break; | 149 |
| 150 case 1: | 150 if (isArityError) { |
| 151 if (true) { | 151 } |
| 152 staticVoidMethodPartialOverload2Method(info); | 152 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 153 return; | 153 } |
| 154 } | 154 |
| 155 break; | 155 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
| 156 default: | 156 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "promiseMethodPartialOverload"); |
| 157 isArityError = true; | 157 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
| 158 } | 158 |
| 159 | 159 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 160 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticVoidMethodPartialOverload"); | 160 |
| 161 | 161 Document* document; |
| 162 if (isArityError) { | 162 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 163 } | 163 if (!document) { |
| 164 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 164 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
| 165 } | 165 |
| 166 | 166 return; |
| 167 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 167 } |
| 168 { | 168 |
| 169 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); | 169 v8SetReturnValue(info, TestInterfacePartial3Implementation::promiseMethodParti
alOverload(*impl, document).v8Value()); |
| 170 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 170 } |
| 171 | 171 |
| 172 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 172 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) { |
| 173 | 173 bool isArityError = false; |
| 174 Document* document; | 174 switch (std::min(1, info.Length())) { |
| 175 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 175 case 0: |
| 176 if (!document) { | 176 break; |
| 177 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); | 177 case 1: |
| 178 | 178 if (V8Document::hasInstance(info[0], info.GetIsolate())) { |
| 179 return; | 179 promiseMethodPartialOverload3Method(info); |
| 180 } | 180 return; |
| 181 | 181 } |
| 182 v8SetReturnValue(info, TestInterfacePartial3Implementation::promiseMethodPar
tialOverload(*impl, document).v8Value()); | 182 break; |
| 183 } | 183 default: |
| 184 | 184 isArityError = true; |
| 185 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8
::Value>& info) | 185 } |
| 186 { | 186 |
| 187 bool isArityError = false; | 187 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "promiseMethodPartialOverload"); |
| 188 switch (std::min(1, info.Length())) { | 188 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
| 189 case 0: | 189 |
| 190 break; | 190 if (isArityError) { |
| 191 case 1: | 191 } |
| 192 if (V8Document::hasInstance(info[0], info.GetIsolate())) { | 192 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 193 promiseMethodPartialOverload3Method(info); | 193 } |
| 194 return; | 194 |
| 195 } | 195 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) { |
| 196 break; | 196 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "staticPromiseMethodPartialOverload"); |
| 197 default: | 197 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
| 198 isArityError = true; | 198 |
| 199 } | 199 V8StringResource<> value; |
| 200 | 200 value = info[0]; |
| 201 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); | 201 if (!value.prepare(exceptionState)) |
| 202 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 202 return; |
| 203 | 203 |
| 204 if (isArityError) { | 204 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMetho
dPartialOverload(value).v8Value()); |
| 205 } | 205 } |
| 206 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 206 |
| 207 } | 207 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) { |
| 208 | 208 bool isArityError = false; |
| 209 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback
Info<v8::Value>& info) | 209 switch (std::min(1, info.Length())) { |
| 210 { | 210 case 0: |
| 211 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); | 211 break; |
| 212 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 212 case 1: |
| 213 | 213 if (true) { |
| 214 V8StringResource<> value; | 214 staticPromiseMethodPartialOverload2Method(info); |
| 215 value = info[0]; | 215 return; |
| 216 if (!value.prepare(exceptionState)) | 216 } |
| 217 return; | 217 break; |
| 218 | 218 default: |
| 219 v8SetReturnValue(info, TestInterfacePartial3Implementation::staticPromiseMet
hodPartialOverload(value).v8Value()); | 219 isArityError = true; |
| 220 } | 220 } |
| 221 | 221 |
| 222 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI
nfo<v8::Value>& info) | 222 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "staticPromiseMethodPartialOverload"); |
| 223 { | 223 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
| 224 bool isArityError = false; | 224 |
| 225 switch (std::min(1, info.Length())) { | 225 if (isArityError) { |
| 226 case 0: | 226 } |
| 227 break; | 227 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 228 case 1: | 228 } |
| 229 if (true) { | 229 |
| 230 staticPromiseMethodPartialOverload2Method(info); | 230 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 231 return; | 231 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 232 } | 232 |
| 233 break; | 233 V8StringResource<> value; |
| 234 default: | 234 value = info[0]; |
| 235 isArityError = true; | 235 if (!value.prepare()) |
| 236 } | 236 return; |
| 237 | 237 |
| 238 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "staticPromiseMethodPartialOverload"); | 238 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); |
| 239 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 239 } |
| 240 | 240 |
| 241 if (isArityError) { | 241 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 242 } | 242 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 243 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 243 |
| 244 } | 244 Node* node; |
| 245 | 245 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 246 static void partial2VoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 246 if (!node) { |
| 247 { | 247 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::faile
dToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of type 'N
ode'.")); |
| 248 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 248 |
| 249 | 249 return; |
| 250 V8StringResource<> value; | 250 } |
| 251 value = info[0]; | 251 |
| 252 if (!value.prepare()) | 252 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, node); |
| 253 return; | 253 } |
| 254 | 254 |
| 255 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, value); | 255 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 256 } | 256 bool isArityError = false; |
| 257 | 257 switch (std::min(1, info.Length())) { |
| 258 static void partial2VoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>&
info) | 258 case 0: |
| 259 { | 259 break; |
| 260 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 260 case 1: |
| 261 | 261 if (V8Node::hasInstance(info[0], info.GetIsolate())) { |
| 262 Node* node; | 262 partial2VoidMethod3Method(info); |
| 263 node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 263 return; |
| 264 if (!node) { | 264 } |
| 265 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::f
ailedToExecute("partial2VoidMethod", "TestInterface", "parameter 1 is not of typ
e 'Node'.")); | 265 if (true) { |
| 266 | 266 partial2VoidMethod2Method(info); |
| 267 return; | 267 return; |
| 268 } | 268 } |
| 269 | 269 break; |
| 270 TestInterfacePartial3Implementation::partial2VoidMethod(*impl, node); | 270 default: |
| 271 } | 271 isArityError = true; |
| 272 | 272 } |
| 273 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 273 |
| 274 { | 274 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "partial2VoidMethod"); |
| 275 bool isArityError = false; | 275 |
| 276 switch (std::min(1, info.Length())) { | 276 if (isArityError) { |
| 277 case 0: | 277 } |
| 278 break; | 278 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 279 case 1: | 279 } |
| 280 if (V8Node::hasInstance(info[0], info.GetIsolate())) { | 280 |
| 281 partial2VoidMethod3Method(info); | 281 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) { |
| 282 return; | 282 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "partialVoidTestEnumModulesArgMethod"); |
| 283 } | 283 |
| 284 if (true) { | 284 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 285 partial2VoidMethod2Method(info); | 285 |
| 286 return; | 286 if (UNLIKELY(info.Length() < 1)) { |
| 287 } | 287 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.
Length())); |
| 288 break; | 288 return; |
| 289 default: | 289 } |
| 290 isArityError = true; | 290 |
| 291 } | 291 V8StringResource<> arg; |
| 292 | 292 arg = info[0]; |
| 293 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "partial2VoidMethod"); | 293 if (!arg.prepare()) |
| 294 | 294 return; |
| 295 if (isArityError) { | 295 const char* validArgValues[] = { |
| 296 } | 296 "EnumModulesValue1", |
| 297 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 297 "EnumModulesValue2", |
| 298 } | 298 }; |
| 299 | 299 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "TestE
numModules", exceptionState)) { |
| 300 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 300 return; |
| 301 { | 301 } |
| 302 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "partialVoidTestEnumModulesArgMethod"); | 302 |
| 303 | 303 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*impl
, arg); |
| 304 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 304 } |
| 305 | 305 |
| 306 if (UNLIKELY(info.Length() < 1)) { | 306 void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) { |
| 307 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 307 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgMet
hodMethod(info); |
| 308 return; | 308 } |
| 309 } | 309 |
| 310 | 310 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 311 V8StringResource<> arg; | 311 V8StringResource<> value; |
| 312 arg = info[0]; | 312 value = info[0]; |
| 313 if (!arg.prepare()) | 313 if (!value.prepare()) |
| 314 return; | 314 return; |
| 315 const char* validArgValues[] = { | 315 |
| 316 "EnumModulesValue1", | 316 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); |
| 317 "EnumModulesValue2", | 317 } |
| 318 }; | 318 |
| 319 if (!isValidEnum(arg, validArgValues, WTF_ARRAY_LENGTH(validArgValues), "Tes
tEnumModules", exceptionState)) { | 319 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 320 return; | 320 bool isArityError = false; |
| 321 } | 321 switch (std::min(1, info.Length())) { |
| 322 | 322 case 0: |
| 323 TestInterfacePartial3Implementation::partialVoidTestEnumModulesArgMethod(*im
pl, arg); | 323 break; |
| 324 } | 324 case 1: |
| 325 | 325 if (true) { |
| 326 void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::FunctionCallbac
kInfo<v8::Value>& info) | 326 partial2StaticVoidMethod2Method(info); |
| 327 { | 327 return; |
| 328 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM
ethodMethod(info); | 328 } |
| 329 } | 329 break; |
| 330 | 330 default: |
| 331 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 331 isArityError = true; |
| 332 { | 332 } |
| 333 V8StringResource<> value; | 333 |
| 334 value = info[0]; | 334 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "partial2StaticVoidMethod"); |
| 335 if (!value.prepare()) | 335 |
| 336 return; | 336 if (isArityError) { |
| 337 | 337 } |
| 338 TestInterfacePartial3Implementation::partial2StaticVoidMethod(value); | 338 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
| 339 } | 339 } |
| 340 | 340 |
| 341 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | 341 static void unscopableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) { |
| 342 { | 342 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 343 bool isArityError = false; | 343 |
| 344 switch (std::min(1, info.Length())) { | 344 TestInterfacePartial3Implementation::unscopableVoidMethod(*impl); |
| 345 case 0: | 345 } |
| 346 break; | 346 |
| 347 case 1: | 347 void unscopableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) { |
| 348 if (true) { | 348 TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethod(info)
; |
| 349 partial2StaticVoidMethod2Method(info); | 349 } |
| 350 return; | 350 |
| 351 } | 351 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 352 break; | 352 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 353 default: | 353 |
| 354 isArityError = true; | 354 TestInterfacePartial4::partial4VoidMethod(*impl); |
| 355 } | 355 } |
| 356 | 356 |
| 357 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "partial2StaticVoidMethod"); | 357 void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) { |
| 358 | 358 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info); |
| 359 if (isArityError) { | 359 } |
| 360 } | 360 |
| 361 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 361 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 362 } | 362 TestInterfacePartial4::partial4StaticVoidMethod(); |
| 363 | 363 } |
| 364 static void unscopableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) | 364 |
| 365 { | 365 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 366 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 366 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod(i
nfo); |
| 367 | |
| 368 TestInterfacePartial3Implementation::unscopableVoidMethod(*impl); | |
| 369 } | |
| 370 | |
| 371 void unscopableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value
>& info) | |
| 372 { | |
| 373 TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethod(inf
o); | |
| 374 } | |
| 375 | |
| 376 static void partial4VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 377 { | |
| 378 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | |
| 379 | |
| 380 TestInterfacePartial4::partial4VoidMethod(*impl); | |
| 381 } | |
| 382 | |
| 383 void partial4VoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&
info) | |
| 384 { | |
| 385 TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethod(info)
; | |
| 386 } | |
| 387 | |
| 388 static void partial4StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
| 389 { | |
| 390 TestInterfacePartial4::partial4StaticVoidMethod(); | |
| 391 } | |
| 392 | |
| 393 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | |
| 394 { | |
| 395 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod
(info); | |
| 396 } | 367 } |
| 397 | 368 |
| 398 } // namespace TestInterfaceImplementationPartialV8Internal | 369 } // namespace TestInterfaceImplementationPartialV8Internal |
| 399 | 370 |
| 400 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { | 371 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { |
| 401 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, | 372 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, |
| 402 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, | 373 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, |
| 403 }; | 374 }; |
| 404 | 375 |
| 405 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) | 376 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) { |
| 406 { | 377 // Initialize the interface object's template. |
| 407 // Initialize the interface object's template. | 378 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl
ate); |
| 408 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTem
plate); | 379 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 409 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 380 ALLOW_UNUSED_LOCAL(signature); |
| 410 ALLOW_UNUSED_LOCAL(signature); | 381 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
| 411 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance
Template(); | 382 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 412 ALLOW_UNUSED_LOCAL(instanceTemplate); | 383 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
| 413 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototy
peTemplate(); | 384 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 414 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 385 // Register DOM constants, attributes and operations. |
| 415 // Register DOM constants, attributes and operations. | 386 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 416 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 387 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[]
= { |
| 417 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants
[] = { | 388 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi
gnedShort}, |
| 418 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUn
signedShort}, | 389 }; |
| 419 }; | 390 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype
Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); |
| 420 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototy
peTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)
); | 391 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto
typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE
NGTH(V8TestInterfaceMethods)); |
| 421 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, pro
totypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_
LENGTH(V8TestInterfaceMethods)); | 392 } |
| 422 } | |
| 423 } | 393 } |
| 424 | 394 |
| 425 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::
Object> prototype, v8::Local<v8::Function> interface) | 395 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::
Object> prototype, v8::Local<v8::Function> interface) { |
| 426 { | 396 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy
peInfo.domTemplate(isolate, world); |
| 427 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapper
TypeInfo.domTemplate(isolate, world); | 397 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 428 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 398 ALLOW_UNUSED_LOCAL(signature); |
| 429 ALLOW_UNUSED_LOCAL(signature); | 399 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC
onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int
ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation
PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DE
FAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed
ToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
| 430 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut
eConfiguration = \ | 400 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4LongAttributeConfiguration); |
| 431 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::
partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial
V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT,
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 401 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr
ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation
PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter
faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC
allback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConf
iguration::CheckHolder}; |
| 432 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4LongAttributeConfiguration); | 402 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4StaticLongAttributeConfiguration); |
| 433 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt
tributeConfiguration = \ | 403 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC
onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp
eUnsignedShort}; |
| 434 {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Inte
rnal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplement
ationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0
, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati
on::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::Ch
eckHolder}; | 404 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar
tial4UnsignedShortConfiguration); |
| 435 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4StaticLongAttributeConfiguration); | 405 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo
nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I
nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; |
| 436 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor
tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT
ypeUnsignedShort}; | 406 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4StaticvoidmethodConfiguration); |
| 437 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantP
artial4UnsignedShortConfiguration); | 407 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur
ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par
tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}; |
| 438 const V8DOMConfiguration::MethodConfiguration methodPartial4Staticvoidmethod
Configuration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV
8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 408 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4VoidmethodConfiguration); |
| 439 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4StaticvoidmethodConfiguration); | |
| 440 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig
uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p
artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}; | |
| 441 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4VoidmethodConfiguration); | |
| 442 } | 409 } |
| 443 | 410 |
| 444 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) | 411 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) { |
| 445 { | 412 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); |
| 446 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); | 413 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte
rface::wrapperTypeInfo); |
| 447 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestIn
terface::wrapperTypeInfo); | 414 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test
Interface::wrapperTypeInfo); |
| 448 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te
stInterface::wrapperTypeInfo); | 415 ALLOW_UNUSED_LOCAL(interface); |
| 449 ALLOW_UNUSED_LOCAL(interface); | 416 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(),
instance, prototype, interface); |
| 450 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(
), instance, prototype, interface); | |
| 451 } | 417 } |
| 452 | 418 |
| 453 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState) | 419 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState) { |
| 454 { | 420 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); |
| 455 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); | |
| 456 } | 421 } |
| 457 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co
ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj
ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in
terfaceTemplate) | 422 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co
ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj
ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in
terfaceTemplate) { |
| 458 { | |
| 459 #error No one is currently using a partial interface with context-dependent prop
erties. If you\'re planning to use it, please consult with the binding team: <b
link-reviews-bindings@chromium.org> | 423 #error No one is currently using a partial interface with context-dependent prop
erties. If you\'re planning to use it, please consult with the binding team: <b
link-reviews-bindings@chromium.org> |
| 460 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototyp
eObject, interfaceObject, interfaceTemplate); | 424 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO
bject, interfaceObject, interfaceTemplate); |
| 461 v8::Isolate* isolate = context->GetIsolate(); | 425 v8::Isolate* isolate = context->GetIsolate(); |
| 462 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); | 426 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); |
| 463 v8::Local<v8::Object> unscopables; | 427 v8::Local<v8::Object> unscopables; |
| 464 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol
))) | 428 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))
) |
| 465 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalCh
ecked().As<v8::Object>(); | 429 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke
d().As<v8::Object>(); |
| 466 else | 430 else |
| 467 unscopables = v8::Object::New(isolate); | 431 unscopables = v8::Object::New(isolate); |
| 468 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopable
VoidMethod"), v8::True(isolate)).FromJust(); | 432 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); |
| 469 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables)
.FromJust(); | 433 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); |
| 470 } | 434 } |
| 471 | 435 |
| 472 void V8TestInterfacePartial::initialize() | 436 void V8TestInterfacePartial::initialize() { |
| 473 { | 437 // Should be invoked from ModulesInitializer. |
| 474 // Should be invoked from ModulesInitializer. | 438 V8TestInterface::updateWrapperTypeInfo( |
| 475 V8TestInterface::updateWrapperTypeInfo( | 439 &V8TestInterfacePartial::installV8TestInterfaceTemplate, |
| 476 &V8TestInterfacePartial::installV8TestInterfaceTemplate, | 440 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
| 477 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 441 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T
estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
| 478 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 442 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf
ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo
adMethod); |
| 479 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 443 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface
(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth
od); |
| 480 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 444 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt
erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial
OverloadMethod); |
| 481 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 445 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte
rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
| 482 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 446 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te
stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
| 483 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | |
| 484 } | 447 } |
| 485 | 448 |
| 486 } // namespace blink | 449 } // namespace blink |
| OLD | NEW |