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

Unified Diff: Source/bindings/dart/custom/DartFormDataCustom.cpp

Issue 18337011: Added custom bindings for renamed custom functions. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | Source/bindings/dart/custom/DartWebSocketCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/custom/DartFormDataCustom.cpp
diff --git a/Source/bindings/dart/custom/DartFormDataCustom.cpp b/Source/bindings/dart/custom/DartFormDataCustom.cpp
index 229b169ea89399cc54805ad8debc6c0aa97dc653..121961da1e6c8aba05573048098630fc8d7419e5 100644
--- a/Source/bindings/dart/custom/DartFormDataCustom.cpp
+++ b/Source/bindings/dart/custom/DartFormDataCustom.cpp
@@ -70,23 +70,41 @@ void appendCallback(Dart_NativeArguments args)
goto fail;
Dart_Handle valueHandle = Dart_GetNativeArgument(args, 2);
- if (DartDOMWrapper::instanceOf<DartBlob>(valueHandle)) {
- Blob* blob = DartBlob::toNative(valueHandle, exception);
- if (exception)
- goto fail;
+ DartStringAdapter filename = DartUtilities::dartToStringWithNullCheck(valueHandle, exception);
+ if (exception)
+ goto fail;
- DartStringAdapter filename = DartUtilities::dartToStringWithNullCheck(Dart_GetNativeArgument(args, 3), exception);
- if (exception)
- goto fail;
+ receiver->append(name, filename);
blois 2013/07/08 23:09:30 Isn't it: append(String name, String value) append
- receiver->append(name, blob, filename);
- } else {
- DartStringAdapter filename = DartUtilities::dartToStringWithNullCheck(valueHandle, exception);
- if (exception)
- goto fail;
+ return;
+ }
- receiver->append(name, filename);
- }
+fail:
+ Dart_ThrowException(exception);
+ ASSERT_NOT_REACHED();
+}
+
+void appendBlobCallback(Dart_NativeArguments args)
+{
+ DartApiScope dartApiScope;
+ Dart_Handle exception = 0;
+ {
+ DOMFormData* receiver = DartDOMWrapper::receiver<DOMFormData>(args);
+
+ DartStringAdapter name = DartUtilities::dartToStringWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
Emily Fortuna 2013/07/08 22:48:20 these files don't seem to follow the 80 char conve
blois 2013/07/08 23:09:30 Blink does not abide by the 80 char rule.
+ if (exception)
+ goto fail;
+
+ Dart_Handle valueHandle = Dart_GetNativeArgument(args, 2);
+ Blob* blob = DartBlob::toNative(valueHandle, exception);
+ if (exception)
+ goto fail;
+
+ DartStringAdapter filename = DartUtilities::dartToStringWithNullCheck(Dart_GetNativeArgument(args, 3), exception);
+ if (exception)
+ goto fail;
+
+ receiver->append(name, blob, filename);
return;
}
« no previous file with comments | « no previous file | Source/bindings/dart/custom/DartWebSocketCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698