| Index: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
| index 7ed4d7fc98e4581c2e4b3d1c61e923f1bff1b3c4..e840b30e4d2e371a0a757ef362698e425b79a28d 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
| @@ -892,7 +892,10 @@ v8::Local<v8::Object> {{v8_class}}::findInstanceInPrototypeChain(v8::Local<v8::V
|
| {##############################################################################}
|
| {% block native_value_traits %}
|
| {{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
|
| - return {{v8_class}}::toImplWithTypeCheck(isolate, value);
|
| + {{cpp_class}}* nativeValue = {{v8_class}}::toImplWithTypeCheck(isolate, value);
|
| + if (!nativeValue)
|
| + exceptionState.throwTypeError("Unable to convert value to {{interface_name}}.");
|
| + return nativeValue;
|
| }
|
|
|
| {% endblock %}
|
|
|