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

Unified Diff: Source/WebCore/bindings/dart/custom/DartDirectoryEntrySyncCustom.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/DartDirectoryEntrySyncCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartDirectoryEntrySyncCustom.cpp b/Source/WebCore/bindings/dart/custom/DartDirectoryEntrySyncCustom.cpp
index d20fdc9ea3e2a3987ba6a4441f3d956004889d65..78e3d463daa383e8075edcd45d00514e1adb2bc8 100644
--- a/Source/WebCore/bindings/dart/custom/DartDirectoryEntrySyncCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartDirectoryEntrySyncCustom.cpp
@@ -45,11 +45,9 @@ void getFileCallback(Dart_NativeArguments args)
{
DirectoryEntrySync* receiver = DartDOMWrapper::receiver<DirectoryEntrySync>(args);
- ParameterAdapter<String> path(Dart_GetNativeArgument(args, 1), DartUtilities::ConvertNullToDefaultValue);
- if (!path.conversionSuccessful()) {
- exception = path.exception();
+ DartStringAdapter path = DartUtilities::dartToStringWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
+ if (exception)
goto fail;
- }
RefPtr<WebKitFlags> flags = 0;
Dart_Handle flagsHandle = Dart_GetNativeArgument(args, 2);
@@ -84,11 +82,9 @@ void getDirectoryCallback(Dart_NativeArguments args)
{
DirectoryEntrySync* receiver = DartDOMWrapper::receiver<DirectoryEntrySync>(args);
- ParameterAdapter<String> path(Dart_GetNativeArgument(args, 1), DartUtilities::ConvertNullToDefaultValue);
- if (!path.conversionSuccessful()) {
- exception = path.exception();
+ DartStringAdapter path = DartUtilities::dartToStringWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
+ if (exception)
goto fail;
- }
RefPtr<WebKitFlags> flags = 0;
Dart_Handle flagsHandle = Dart_GetNativeArgument(args, 2);

Powered by Google App Engine
This is Rietveld 408576698