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

Unified Diff: Source/WebCore/bindings/dart/custom/DartDirectoryEntryCustom.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/DartDirectoryEntryCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartDirectoryEntryCustom.cpp b/Source/WebCore/bindings/dart/custom/DartDirectoryEntryCustom.cpp
index 08c53932d2b555c34447a14c8e38ca07e5a12640..48b4656021339552d63c8ac5aac6f7682e8a6b8a 100644
--- a/Source/WebCore/bindings/dart/custom/DartDirectoryEntryCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartDirectoryEntryCustom.cpp
@@ -46,11 +46,9 @@ void getFileCallback(Dart_NativeArguments args)
{
DirectoryEntry* receiver = DartDOMWrapper::receiver<DirectoryEntry>(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)
{
DirectoryEntry* receiver = DartDOMWrapper::receiver<DirectoryEntry>(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