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

Unified Diff: Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp

Issue 10660025: Cleanup dart to string conversions. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: . Created 8 years, 6 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: Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp b/Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp
index dd466b494cefa7a07df44b1d0e3fb1eaa2f15b89..413fd598bc9e0981ad63bed4320b3400a53e5d7a 100644
--- a/Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartHTMLInputElementCustom.cpp
@@ -54,11 +54,9 @@ void setSelectionRangeCallback(Dart_NativeArguments args)
if (exception)
goto fail;
- const ParameterAdapter<String> direction(Dart_GetNativeArgument(args, 3));
- if (!direction.conversionSuccessful()) {
- exception = direction.exception();
+ DartStringAdapter direction = DartUtilities::dartToString(Dart_GetNativeArgument(args, 3), exception);
+ if (exception)
goto fail;
- }
receiver->setSelectionRange(start, end, direction);
return;
@@ -102,11 +100,9 @@ void selectionDirectionSetter(Dart_NativeArguments args)
goto fail;
}
- const ParameterAdapter<String> value(Dart_GetNativeArgument(args, 1));
- if (!value.conversionSuccessful()) {
- exception = value.exception();
+ DartStringAdapter value = DartUtilities::dartToString(Dart_GetNativeArgument(args, 1), exception);
+ if (exception)
goto fail;
- }
receiver->setSelectionDirection(value);
return;

Powered by Google App Engine
This is Rietveld 408576698