Chromium Code Reviews| 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 "config.h" | 7 #include "config.h" |
| 8 #include "V8TestObject.h" | 8 #include "V8TestObject.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/BindingSecurity.h" | 10 #include "bindings/core/v8/BindingSecurity.h" |
| (...skipping 4538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4549 { | 4549 { |
| 4550 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4550 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4551 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe tter(info); | 4551 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeGe tter(info); |
| 4552 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4552 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4553 } | 4553 } |
| 4554 | 4554 |
| 4555 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4555 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetter(v8::Local <v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4556 { | 4556 { |
| 4557 v8::Handle<v8::Object> holder = info.Holder(); | 4557 v8::Handle<v8::Object> holder = info.Holder(); |
| 4558 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); | 4558 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn terfaceTestInterfaceAttribute", "TestObject", holder, info.GetIsolate()); |
| 4559 if (!V8TestInterface::hasInstance(v8Value, info.GetIsolate())) { | 4559 TestObject* impl = V8TestObject::toImpl(holder); |
| 4560 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); | |
| 4561 if (!cppValue) { | |
| 4560 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); | 4562 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); |
| 4561 exceptionState.throwIfNeeded(); | 4563 exceptionState.throwIfNeeded(); |
| 4562 return; | 4564 return; |
| 4563 } | 4565 } |
| 4564 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4565 TestInterfaceImplementation* cppValue = V8TestInterface::toImpl(v8::Handle<v 8::Object>::Cast(v8Value)); | |
| 4566 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); | 4566 impl->setTypeCheckingInterfaceTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 4567 } | 4567 } |
| 4568 | 4568 |
| 4569 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v 8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn fo<void>& info) | 4569 static void typeCheckingInterfaceTestInterfaceAttributeAttributeSetterCallback(v 8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackIn fo<void>& info) |
| 4570 { | 4570 { |
| 4571 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4571 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4572 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe tter(v8Value, info); | 4572 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceAttributeAttributeSe tter(v8Value, info); |
| 4573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4573 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4574 } | 4574 } |
| 4575 | 4575 |
| 4576 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info) | 4576 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetter(con st v8::PropertyCallbackInfo<v8::Value>& info) |
| 4577 { | 4577 { |
| 4578 v8::Handle<v8::Object> holder = info.Holder(); | 4578 v8::Handle<v8::Object> holder = info.Holder(); |
| 4579 TestObject* impl = V8TestObject::toImpl(holder); | 4579 TestObject* impl = V8TestObject::toImpl(holder); |
| 4580 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf aceOrNullAttribute()), impl); | 4580 v8SetReturnValueFast(info, WTF::getPtr(impl->typeCheckingInterfaceTestInterf aceOrNullAttribute()), impl); |
| 4581 } | 4581 } |
| 4582 | 4582 |
| 4583 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) | 4583 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeGetterCall back(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 4584 { | 4584 { |
| 4585 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 4585 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 4586 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri buteGetter(info); | 4586 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri buteGetter(info); |
| 4587 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4587 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4588 } | 4588 } |
| 4589 | 4589 |
| 4590 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 4590 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetter(v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 4591 { | 4591 { |
| 4592 v8::Handle<v8::Object> holder = info.Holder(); | 4592 v8::Handle<v8::Object> holder = info.Holder(); |
| 4593 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); | 4593 ExceptionState exceptionState(ExceptionState::SetterContext, "typeCheckingIn terfaceTestInterfaceOrNullAttribute", "TestObject", holder, info.GetIsolate()); |
| 4594 if (!isUndefinedOrNull(v8Value) && !V8TestInterface::hasInstance(v8Value, in fo.GetIsolate())) { | 4594 TestObject* impl = V8TestObject::toImpl(holder); |
| 4595 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); | |
| 4596 if (!cppValue && !isUndefinedOrNull(v8Value)) { | |
| 4595 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); | 4597 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface'."); |
| 4596 exceptionState.throwIfNeeded(); | 4598 exceptionState.throwIfNeeded(); |
| 4597 return; | 4599 return; |
| 4598 } | 4600 } |
| 4599 TestObject* impl = V8TestObject::toImpl(holder); | |
| 4600 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck (info.GetIsolate(), v8Value); | |
| 4601 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa lue)); | 4601 impl->setTypeCheckingInterfaceTestInterfaceOrNullAttribute(WTF::getPtr(cppVa lue)); |
| 4602 } | 4602 } |
| 4603 | 4603 |
| 4604 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall backInfo<void>& info) | 4604 static void typeCheckingInterfaceTestInterfaceOrNullAttributeAttributeSetterCall back(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCall backInfo<void>& info) |
| 4605 { | 4605 { |
| 4606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 4606 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 4607 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri buteSetter(v8Value, info); | 4607 TestObjectV8Internal::typeCheckingInterfaceTestInterfaceOrNullAttributeAttri buteSetter(v8Value, info); |
| 4608 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 4608 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 4609 } | 4609 } |
| 4610 | 4610 |
| (...skipping 5493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10104 | 10104 |
| 10105 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) | 10105 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) |
| 10106 { | 10106 { |
| 10107 if (UNLIKELY(info.Length() < 1)) { | 10107 if (UNLIKELY(info.Length() < 1)) { |
| 10108 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); | 10108 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); |
| 10109 return; | 10109 return; |
| 10110 } | 10110 } |
| 10111 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10111 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10112 TestInterfaceEmpty* testInterfaceEmptyArg; | 10112 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 10113 { | 10113 { |
| 10114 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) { | 10114 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]); |
| 10115 if (!testInterfaceEmptyArg) { | |
| 10115 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "Test Object", "parameter 1 is not of type 'TestInterfaceEmpty'.")); | 10116 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg", "Test Object", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
| 10116 return; | 10117 return; |
| 10117 } | 10118 } |
| 10118 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje ct>::Cast(info[0])); | |
| 10119 } | 10119 } |
| 10120 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt yArg); | 10120 impl->typeCheckingInterfaceVoidMethodTestInterfaceEmptyArg(testInterfaceEmpt yArg); |
| 10121 } | 10121 } |
| 10122 | 10122 |
| 10123 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) | 10123 static void typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10124 { | 10124 { |
| 10125 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10125 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10126 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe thod(info); | 10126 TestObjectV8Internal::typeCheckingInterfaceVoidMethodTestInterfaceEmptyArgMe thod(info); |
| 10127 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10127 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10128 } | 10128 } |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 10155 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) | 10155 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) |
| 10156 { | 10156 { |
| 10157 if (UNLIKELY(info.Length() < 1)) { | 10157 if (UNLIKELY(info.Length() < 1)) { |
| 10158 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); | 10158 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "TestOb ject", 1, info.Length()), info.GetIsolate()); |
| 10159 return; | 10159 return; |
| 10160 } | 10160 } |
| 10161 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10161 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10162 Node* node1; | 10162 Node* node1; |
| 10163 Node* node2; | 10163 Node* node2; |
| 10164 { | 10164 { |
| 10165 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { | 10165 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 10166 if (!node1) { | |
| 10166 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 1 is not of type 'Node'.")); | 10167 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 1 is not of type 'Node'.")); |
| 10167 return; | 10168 return; |
| 10168 } | 10169 } |
| 10169 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); | |
| 10170 if (UNLIKELY(info.Length() <= 1)) { | 10170 if (UNLIKELY(info.Length() <= 1)) { |
| 10171 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1); | 10171 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1); |
| 10172 return; | 10172 return; |
| 10173 } | 10173 } |
| 10174 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) { | 10174 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| 10175 if (!node2) { | |
| 10175 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 2 is not of type 'Node'.")); | 10176 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", "Test Object", "parameter 2 is not of type 'Node'.")); |
| 10176 return; | 10177 return; |
| 10177 } | 10178 } |
| 10178 node2 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[1])); | |
| 10179 } | 10179 } |
| 10180 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2); | 10180 impl->useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg(node1, node2); |
| 10181 } | 10181 } |
| 10182 | 10182 |
| 10183 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) | 10183 static void useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10184 { | 10184 { |
| 10185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10185 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10186 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info); | 10186 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMe thod(info); |
| 10187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10187 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10188 } | 10188 } |
| 10189 | 10189 |
| 10190 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) | 10190 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethod(const v8: :FunctionCallbackInfo<v8::Value>& info) |
| 10191 { | 10191 { |
| 10192 if (UNLIKELY(info.Length() < 2)) { | 10192 if (UNLIKELY(info.Length() < 2)) { |
| 10193 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestOb ject", 2, info.Length()), info.GetIsolate()); | 10193 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "TestOb ject", 2, info.Length()), info.GetIsolate()); |
| 10194 return; | 10194 return; |
| 10195 } | 10195 } |
| 10196 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10196 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10197 Node* node1; | 10197 Node* node1; |
| 10198 Node* node2; | 10198 Node* node2; |
| 10199 { | 10199 { |
| 10200 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { | 10200 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 10201 if (!node1) { | |
| 10201 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 1 is not of type 'Node'.")); | 10202 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 1 is not of type 'Node'.")); |
| 10202 return; | 10203 return; |
| 10203 } | 10204 } |
| 10204 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); | 10205 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| 10205 if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !V8Node::hasInst ance(info[1], info.GetIsolate())) { | 10206 if (!node2 && !isUndefinedOrNull(info[1])) { |
| 10206 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 2 is not of type 'Node'.")); | 10207 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", "Test Object", "parameter 2 is not of type 'Node'.")); |
| 10207 return; | 10208 return; |
| 10208 } | 10209 } |
| 10209 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); | |
| 10210 } | 10210 } |
| 10211 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2); | 10211 impl->useToImpl4ArgumentsCheckingIfPossibleWithNullableArg(node1, node2); |
| 10212 } | 10212 } |
| 10213 | 10213 |
| 10214 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) | 10214 static void useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback(c onst v8::FunctionCallbackInfo<v8::Value>& info) |
| 10215 { | 10215 { |
| 10216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10216 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10217 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info); | 10217 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMe thod(info); |
| 10218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10218 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10219 } | 10219 } |
| 10220 | 10220 |
| 10221 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) | 10221 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethod(const v8 ::FunctionCallbackInfo<v8::Value>& info) |
| 10222 { | 10222 { |
| 10223 if (UNLIKELY(info.Length() < 1)) { | 10223 if (UNLIKELY(info.Length() < 1)) { |
| 10224 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestO bject", 1, info.Length()), info.GetIsolate()); | 10224 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "TestO bject", 1, info.Length()), info.GetIsolate()); |
| 10225 return; | 10225 return; |
| 10226 } | 10226 } |
| 10227 TestObject* impl = V8TestObject::toImpl(info.Holder()); | 10227 TestObject* impl = V8TestObject::toImpl(info.Holder()); |
| 10228 Node* node1; | 10228 Node* node1; |
| 10229 Node* node2; | 10229 Node* node2; |
| 10230 { | 10230 { |
| 10231 if (info.Length() > 0 && !V8Node::hasInstance(info[0], info.GetIsolate() )) { | 10231 node1 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
| 10232 if (!node1) { | |
| 10232 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 1 is not of type 'Node'.")); | 10233 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 1 is not of type 'Node'.")); |
| 10233 return; | 10234 return; |
| 10234 } | 10235 } |
| 10235 node1 = V8Node::toImpl(v8::Handle<v8::Object>::Cast(info[0])); | 10236 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); |
| 10236 if (info.Length() > 1 && !V8Node::hasInstance(info[1], info.GetIsolate() )) { | 10237 if (!node2) { |
|
Jens Widell
2014/12/18 13:47:05
I dropped the "info.Length() > N" check on purpose
haraken
2014/12/18 14:50:27
This sounds like a valid reasoning.
| |
| 10237 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 2 is not of type 'Node'.")); | 10238 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", "Tes tObject", "parameter 2 is not of type 'Node'.")); |
| 10238 return; | 10239 return; |
| 10239 } | 10240 } |
| 10240 node2 = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); | |
| 10241 } | 10241 } |
| 10242 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2); | 10242 impl->useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg(node1, node2); |
| 10243 } | 10243 } |
| 10244 | 10244 |
| 10245 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) | 10245 static void useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback( const v8::FunctionCallbackInfo<v8::Value>& info) |
| 10246 { | 10246 { |
| 10247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 10247 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 10248 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgM ethod(info); | 10248 TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgM ethod(info); |
| 10249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 10249 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 10250 } | 10250 } |
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 11610 return false; | 11610 return false; |
| 11611 | 11611 |
| 11612 ScriptState::Scope scope(scriptState); | 11612 ScriptState::Scope scope(scriptState); |
| 11613 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); | 11613 v8::Handle<v8::Value> holder = toV8(holderImpl, scriptState->context()->Glob al(), scriptState->isolate()); |
| 11614 | 11614 |
| 11615 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; | 11615 ExceptionState exceptionState(ExceptionState::SetterContext, "enumForPrivate Script", "TestObject", scriptState->context()->Global(), scriptState->isolate()) ; |
| 11616 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); | 11616 return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateIn UserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState-> isolate(), cppValue)); |
| 11617 } | 11617 } |
| 11618 | 11618 |
| 11619 } // namespace blink | 11619 } // namespace blink |
| OLD | NEW |