| Index: Source/WebCore/bindings/dart/custom/DartXMLHttpRequestCustom.cpp
|
| diff --git a/Source/WebCore/bindings/dart/custom/DartXMLHttpRequestCustom.cpp b/Source/WebCore/bindings/dart/custom/DartXMLHttpRequestCustom.cpp
|
| index b6313bdd2aeb377101151049317dd2cf4ace9662..deb80213afc08c7c0a34984fdeaf91a2561cac73 100644
|
| --- a/Source/WebCore/bindings/dart/custom/DartXMLHttpRequestCustom.cpp
|
| +++ b/Source/WebCore/bindings/dart/custom/DartXMLHttpRequestCustom.cpp
|
| @@ -72,16 +72,12 @@ void openCallback(Dart_NativeArguments args)
|
| Dart_Handle exception = 0;
|
| {
|
| XMLHttpRequest* receiver = DartDOMWrapper::receiver<XMLHttpRequest>(args);
|
| - const ParameterAdapter<String> method(Dart_GetNativeArgument(args, 1));
|
| - if (!method.conversionSuccessful()) {
|
| - exception = method.exception();
|
| + DartStringAdapter method = DartUtilities::dartToString(Dart_GetNativeArgument(args, 1), exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
| - const ParameterAdapter<String> url(Dart_GetNativeArgument(args, 2));
|
| - if (!url.conversionSuccessful()) {
|
| - exception = url.exception();
|
| + DartStringAdapter url = DartUtilities::dartToString(Dart_GetNativeArgument(args, 2), exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
|
|
| ScriptExecutionContext* context = DartUtilities::scriptExecutionContext();
|
| if (!context)
|
| @@ -97,19 +93,15 @@ void openCallback(Dart_NativeArguments args)
|
|
|
| Dart_Handle arg4 = Dart_GetNativeArgument(args, 4);
|
| if (!Dart_IsNull(arg4)) {
|
| - const ParameterAdapter<String> user(arg4);
|
| - if (!user.conversionSuccessful()) {
|
| - exception = user.exception();
|
| + DartStringAdapter user = DartUtilities::dartToString(arg4, exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
|
|
| Dart_Handle arg5 = Dart_GetNativeArgument(args, 5);
|
| if (!Dart_IsNull(arg5)) {
|
| - const ParameterAdapter<String> passwd(arg5);
|
| - if (!passwd.conversionSuccessful()) {
|
| - exception = passwd.exception();
|
| + DartStringAdapter passwd = DartUtilities::dartToString(arg5, exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
|
|
| receiver->open(method, fullURL, async, user, passwd, ec);
|
| } else
|
| @@ -165,11 +157,9 @@ void sendCallback(Dart_NativeArguments args)
|
| receiver->send(asArrayBuffer, ec);
|
| #endif
|
| } else {
|
| - const ParameterAdapter<String> asString(arg1);
|
| - if (!asString.conversionSuccessful()) {
|
| - exception = asString.exception();
|
| + DartStringAdapter asString = DartUtilities::dartToString(arg1, exception);
|
| + if (exception)
|
| goto fail;
|
| - }
|
| receiver->send(asString, ec);
|
| }
|
|
|
|
|