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

Unified Diff: Source/WebCore/bindings/dart/custom/DartHistoryCustom.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/DartHistoryCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartHistoryCustom.cpp b/Source/WebCore/bindings/dart/custom/DartHistoryCustom.cpp
index d897a76965b2bbe7fd6af4f6acc3779b970a9325..82013b538e5c3245215bac32daf6f0e0ef66af8e 100644
--- a/Source/WebCore/bindings/dart/custom/DartHistoryCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartHistoryCustom.cpp
@@ -54,18 +54,14 @@ static void addStateObjectHelper(Dart_NativeArguments args, History::StateObject
if (exception)
goto fail;
- const ParameterAdapter<String> title(Dart_GetNativeArgument(args, 2));
- if (!title.conversionSuccessful()) {
- exception = title.exception();
+ DartStringAdapter title = DartUtilities::dartToString(Dart_GetNativeArgument(args, 2), exception);
+ if (exception)
goto fail;
- }
// FIXME: url argument should be optional.
- const ParameterAdapter<String> url(Dart_GetNativeArgument(args, 3));
- if (!url.conversionSuccessful()) {
- exception = url.exception();
+ DartStringAdapter url = DartUtilities::dartToString(Dart_GetNativeArgument(args, 3), exception);
+ if (exception)
goto fail;
- }
ExceptionCode ec = 0;
receiver->stateObjectAdded(data.release(), title, url, stateObjectType, ec);

Powered by Google App Engine
This is Rietveld 408576698