Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp

Issue 2809003004: bindings: Use ExceptionMessages when an interface/callback conversion fails. (Closed)
Patch Set: Add ExceptionMessages::FailedToConvertJSValue Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
index 68098e3f61c0b35e792ff448a0a4c537649a879b..9cbc1bf8644c8a2c359a713a8b335c96c6e7ec99 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -665,8 +665,10 @@ TestInterface2* V8TestInterface2::toImplWithTypeCheck(v8::Isolate* isolate, v8::
TestInterface2* NativeValueTraits<TestInterface2>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
TestInterface2* nativeValue = V8TestInterface2::toImplWithTypeCheck(isolate, value);
- if (!nativeValue)
- exceptionState.ThrowTypeError("Unable to convert value to TestInterface2.");
+ if (!nativeValue) {
+ exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue(
+ "TestInterface2"));
+ }
return nativeValue;
}

Powered by Google App Engine
This is Rietveld 408576698