| 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 "V8TestInterfaceSecureContext.h" | 7 #include "V8TestInterfaceSecureContext.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) | 62 static void secureContextAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::FunctionCallbackInfo<v8::Value>& info) |
| 63 { | 63 { |
| 64 v8::Local<v8::Object> holder = info.Holder(); | 64 v8::Local<v8::Object> holder = info.Holder(); |
| 65 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextA
ttribute", "TestInterfaceSecureContext", holder, info.GetIsolate()); | 65 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextA
ttribute", "TestInterfaceSecureContext", holder, info.GetIsolate()); |
| 66 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 66 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 67 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 67 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 68 if (!cppValue) { | 68 if (!cppValue) { |
| 69 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 69 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 70 exceptionState.throwIfNeeded(); | |
| 71 return; | 70 return; |
| 72 } | 71 } |
| 73 impl->setSecureContextAttribute(cppValue); | 72 impl->setSecureContextAttribute(cppValue); |
| 74 } | 73 } |
| 75 | 74 |
| 76 static void secureContextAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 75 static void secureContextAttributeAttributeSetterCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 77 { | 76 { |
| 78 v8::Local<v8::Value> v8Value = info[0]; | 77 v8::Local<v8::Value> v8Value = info[0]; |
| 79 TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetter(
v8Value, info); | 78 TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetter(
v8Value, info); |
| 80 } | 79 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 92 } | 91 } |
| 93 | 92 |
| 94 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 93 static void secureContextRuntimeEnabledAttributeAttributeSetter(v8::Local<v8::Va
lue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 95 { | 94 { |
| 96 v8::Local<v8::Object> holder = info.Holder(); | 95 v8::Local<v8::Object> holder = info.Holder(); |
| 97 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextR
untimeEnabledAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate()
); | 96 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextR
untimeEnabledAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate()
); |
| 98 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 97 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 99 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 98 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 100 if (!cppValue) { | 99 if (!cppValue) { |
| 101 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 100 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 102 exceptionState.throwIfNeeded(); | |
| 103 return; | 101 return; |
| 104 } | 102 } |
| 105 impl->setSecureContextRuntimeEnabledAttribute(cppValue); | 103 impl->setSecureContextRuntimeEnabledAttribute(cppValue); |
| 106 } | 104 } |
| 107 | 105 |
| 108 static void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) | 106 static void secureContextRuntimeEnabledAttributeAttributeSetterCallback(const v8
::FunctionCallbackInfo<v8::Value>& info) |
| 109 { | 107 { |
| 110 v8::Local<v8::Value> v8Value = info[0]; | 108 v8::Local<v8::Value> v8Value = info[0]; |
| 111 TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAt
tributeSetter(v8Value, info); | 109 TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAt
tributeSetter(v8Value, info); |
| 112 } | 110 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 124 } | 122 } |
| 125 | 123 |
| 126 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 124 static void secureContextWindowExposedAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 127 { | 125 { |
| 128 v8::Local<v8::Object> holder = info.Holder(); | 126 v8::Local<v8::Object> holder = info.Holder(); |
| 129 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
indowExposedAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate())
; | 127 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
indowExposedAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate())
; |
| 130 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 128 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 131 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 129 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 132 if (!cppValue) { | 130 if (!cppValue) { |
| 133 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 131 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 134 exceptionState.throwIfNeeded(); | |
| 135 return; | 132 return; |
| 136 } | 133 } |
| 137 impl->setSecureContextWindowExposedAttribute(cppValue); | 134 impl->setSecureContextWindowExposedAttribute(cppValue); |
| 138 } | 135 } |
| 139 | 136 |
| 140 static void secureContextWindowExposedAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 137 static void secureContextWindowExposedAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 141 { | 138 { |
| 142 v8::Local<v8::Value> v8Value = info[0]; | 139 v8::Local<v8::Value> v8Value = info[0]; |
| 143 TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAtt
ributeSetter(v8Value, info); | 140 TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAtt
ributeSetter(v8Value, info); |
| 144 } | 141 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 156 } | 153 } |
| 157 | 154 |
| 158 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 155 static void secureContextWorkerExposedAttributeAttributeSetter(v8::Local<v8::Val
ue> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 159 { | 156 { |
| 160 v8::Local<v8::Object> holder = info.Holder(); | 157 v8::Local<v8::Object> holder = info.Holder(); |
| 161 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
orkerExposedAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate())
; | 158 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
orkerExposedAttribute", "TestInterfaceSecureContext", holder, info.GetIsolate())
; |
| 162 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 159 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 163 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 160 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 164 if (!cppValue) { | 161 if (!cppValue) { |
| 165 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 162 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 166 exceptionState.throwIfNeeded(); | |
| 167 return; | 163 return; |
| 168 } | 164 } |
| 169 impl->setSecureContextWorkerExposedAttribute(cppValue); | 165 impl->setSecureContextWorkerExposedAttribute(cppValue); |
| 170 } | 166 } |
| 171 | 167 |
| 172 static void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) | 168 static void secureContextWorkerExposedAttributeAttributeSetterCallback(const v8:
:FunctionCallbackInfo<v8::Value>& info) |
| 173 { | 169 { |
| 174 v8::Local<v8::Value> v8Value = info[0]; | 170 v8::Local<v8::Value> v8Value = info[0]; |
| 175 TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAtt
ributeSetter(v8Value, info); | 171 TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAtt
ributeSetter(v8Value, info); |
| 176 } | 172 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 188 } | 184 } |
| 189 | 185 |
| 190 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 186 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 191 { | 187 { |
| 192 v8::Local<v8::Object> holder = info.Holder(); | 188 v8::Local<v8::Object> holder = info.Holder(); |
| 193 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
indowExposedRuntimeEnabledAttribute", "TestInterfaceSecureContext", holder, info
.GetIsolate()); | 189 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
indowExposedRuntimeEnabledAttribute", "TestInterfaceSecureContext", holder, info
.GetIsolate()); |
| 194 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 190 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 195 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 191 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 196 if (!cppValue) { | 192 if (!cppValue) { |
| 197 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 193 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 198 exceptionState.throwIfNeeded(); | |
| 199 return; | 194 return; |
| 200 } | 195 } |
| 201 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue); | 196 impl->setSecureContextWindowExposedRuntimeEnabledAttribute(cppValue); |
| 202 } | 197 } |
| 203 | 198 |
| 204 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 199 static void secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 205 { | 200 { |
| 206 v8::Local<v8::Value> v8Value = info[0]; | 201 v8::Local<v8::Value> v8Value = info[0]; |
| 207 TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabl
edAttributeAttributeSetter(v8Value, info); | 202 TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabl
edAttributeAttributeSetter(v8Value, info); |
| 208 } | 203 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 220 } | 215 } |
| 221 | 216 |
| 222 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) | 217 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetter(v8:
:Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) |
| 223 { | 218 { |
| 224 v8::Local<v8::Object> holder = info.Holder(); | 219 v8::Local<v8::Object> holder = info.Holder(); |
| 225 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
orkerExposedRuntimeEnabledAttribute", "TestInterfaceSecureContext", holder, info
.GetIsolate()); | 220 ExceptionState exceptionState(ExceptionState::SetterContext, "secureContextW
orkerExposedRuntimeEnabledAttribute", "TestInterfaceSecureContext", holder, info
.GetIsolate()); |
| 226 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); | 221 TestInterfaceSecureContext* impl = V8TestInterfaceSecureContext::toImpl(hold
er); |
| 227 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); | 222 bool* cppValue = V8bool::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
| 228 if (!cppValue) { | 223 if (!cppValue) { |
| 229 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); | 224 exceptionState.throwTypeError("The provided value is not of type 'bool'.
"); |
| 230 exceptionState.throwIfNeeded(); | |
| 231 return; | 225 return; |
| 232 } | 226 } |
| 233 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue); | 227 impl->setSecureContextWorkerExposedRuntimeEnabledAttribute(cppValue); |
| 234 } | 228 } |
| 235 | 229 |
| 236 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) | 230 static void secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCall
back(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 237 { | 231 { |
| 238 v8::Local<v8::Value> v8Value = info[0]; | 232 v8::Local<v8::Value> v8Value = info[0]; |
| 239 TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabl
edAttributeAttributeSetter(v8Value, info); | 233 TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabl
edAttributeAttributeSetter(v8Value, info); |
| 240 } | 234 } |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 if (executionContext && (executionContext->isWorkerGlobalScope())) { | 414 if (executionContext && (executionContext->isWorkerGlobalScope())) { |
| 421 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { | 415 if (RuntimeEnabledFeatures::secureFeatureEnabled()) { |
| 422 const V8DOMConfiguration::MethodConfiguration secureContextWorke
rExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRu
ntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerEx
posedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnPrototype}; | 416 const V8DOMConfiguration::MethodConfiguration secureContextWorke
rExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRu
ntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerEx
posedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::Exp
osedToAllScripts, V8DOMConfiguration::OnPrototype}; |
| 423 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExpos
edRuntimeEnabledMethodMethodConfiguration); | 417 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::
Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExpos
edRuntimeEnabledMethodMethodConfiguration); |
| 424 } | 418 } |
| 425 } | 419 } |
| 426 } | 420 } |
| 427 } | 421 } |
| 428 | 422 |
| 429 } // namespace blink | 423 } // namespace blink |
| OLD | NEW |