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

Unified Diff: Source/WebCore/bindings/dart/custom/DartIntentCustom.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/DartIntentCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartIntentCustom.cpp b/Source/WebCore/bindings/dart/custom/DartIntentCustom.cpp
index 9a4e89e39b3721c149ae8bbeddf4352410c48bbb..53f702bdaa9b9cb6aac16712051a6d1211c51df9 100644
--- a/Source/WebCore/bindings/dart/custom/DartIntentCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartIntentCustom.cpp
@@ -42,17 +42,13 @@ void constructorCallback(Dart_NativeArguments args)
DartApiScope dartApiScope;
Dart_Handle exception = 0;
{
- const ParameterAdapter<String> action(Dart_GetNativeArgument(args, 0));
- if (!action.conversionSuccessful()) {
- exception = action.exception();
+ DartStringAdapter action = DartUtilities::dartToString(Dart_GetNativeArgument(args, 0), exception);
+ if (exception)
goto fail;
- }
- 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;
- }
RefPtr<SerializedScriptValue> data;
if (!Dart_IsNull(Dart_GetNativeArgument(args, 2))) {
« no previous file with comments | « Source/WebCore/bindings/dart/custom/DartIDBKeyCustom.cpp ('k') | Source/WebCore/bindings/dart/custom/DartLocationCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698