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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.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/VoidCallbackFunctionTypedef.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
index bb6480bfbeed3d6132bef6ccba4860d3035964e4..c366b8840d7f4912d5948234fa75b9979658e823 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
@@ -83,8 +83,10 @@ bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const S
VoidCallbackFunctionTypedef* NativeValueTraits<VoidCallbackFunctionTypedef>::NativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
VoidCallbackFunctionTypedef* nativeValue = VoidCallbackFunctionTypedef::Create(ScriptState::Current(isolate), value);
- if (!nativeValue)
- exceptionState.ThrowTypeError("Unable to convert value to VoidCallbackFunctionTypedef.");
+ if (!nativeValue) {
+ exceptionState.ThrowTypeError(ExceptionMessages::FailedToConvertJSValue(
+ "VoidCallbackFunctionTypedef"));
+ }
return nativeValue;
}

Powered by Google App Engine
This is Rietveld 408576698