Index: Source/bindings/tests/results/modules/V8TestInterface5.cpp |
diff --git a/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
index 79a88892eeade0fd4104a6e0663e5c30312cb0f6..ee823a87929ce68f02d54fd440ef1c0f200bc7d7 100644 |
--- a/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
+++ b/Source/bindings/tests/results/modules/V8TestInterface5.cpp |
@@ -52,13 +52,13 @@ static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, |
{ |
v8::Handle<v8::Object> holder = info.Holder(); |
ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceAttribute", "TestInterface5", holder, info.GetIsolate()); |
- if (!V8TestInterface5::hasInstance(v8Value, info.GetIsolate())) { |
+ TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
+ TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeCheck(info.GetIsolate(), v8Value); |
+ if (!cppValue) { |
exceptionState.throwTypeError("The provided value is not of type 'TestInterface5'."); |
exceptionState.throwIfNeeded(); |
return; |
} |
- TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
- TestInterface5Implementation* cppValue = V8TestInterface5::toImpl(v8::Handle<v8::Object>::Cast(v8Value)); |
impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
} |
@@ -344,11 +344,11 @@ static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo |
TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()); |
TestInterfaceEmpty* testInterfaceEmptyArg; |
{ |
- if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.GetIsolate())) { |
+ testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
+ if (!testInterfaceEmptyArg) { |
V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1 is not of type 'TestInterfaceEmpty'.")); |
return; |
} |
- testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Object>::Cast(info[0])); |
} |
impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
} |