| Index: Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| diff --git a/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp b/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| index c5df422def13801374af1ab39b6bfcbc6b91a9b2..5b2c91c46e368a5a2ff7e0c00bbf0c2ea7eb4b15 100644
|
| --- a/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| +++ b/Source/WebCore/bindings/dart/custom/DartHTMLCanvasElementCustom.cpp
|
| @@ -56,11 +56,9 @@ void toDataURLCallback(Dart_NativeArguments args)
|
| {
|
| HTMLCanvasElement* receiver = DartDOMWrapper::receiver<HTMLCanvasElement>(args);
|
|
|
| - const ParameterAdapter<String> type(Dart_GetNativeArgument(args, 1));
|
| - if (!type.conversionSuccessful()) {
|
| - exception = type.exception();
|
| + DartStringAdapter type = DartUtilities::dartToString(Dart_GetNativeArgument(args, 1), exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
|
|
| ExceptionCode ec = 0;
|
| String result = receiver->toDataURL(type, 0, ec);
|
| @@ -85,11 +83,9 @@ void getContextCallback(Dart_NativeArguments args)
|
| {
|
| HTMLCanvasElement* receiver = DartDOMWrapper::receiver<HTMLCanvasElement>(args);
|
|
|
| - const ParameterAdapter<String> contextId(Dart_GetNativeArgument(args, 1));
|
| - if (!contextId.conversionSuccessful()) {
|
| - exception = contextId.exception();
|
| + DartStringAdapter contextId = DartUtilities::dartToString(Dart_GetNativeArgument(args, 1), exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
|
|
| RefPtr<CanvasContextAttributes> attrs;
|
| #if ENABLE(WEBGL)
|
|
|