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

Unified Diff: Source/WebCore/bindings/dart/custom/DartWebGLRenderingContextCustom.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/DartWebGLRenderingContextCustom.cpp
diff --git a/Source/WebCore/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp b/Source/WebCore/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
index 476b8c6d78444caf535d3d7a3be88c0e285e8a5a..f66093584feb920493bb7b35c736528e20d0b2cf 100644
--- a/Source/WebCore/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
+++ b/Source/WebCore/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
@@ -264,11 +264,9 @@ void getExtensionCallback(Dart_NativeArguments args)
Dart_Handle exception = 0;
{
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- const ParameterAdapter<String> name(Dart_GetNativeArgument(args, 1));
- if (!name.conversionSuccessful()) {
- exception = name.exception();
+ DartStringAdapter name = DartUtilities::dartToString(Dart_GetNativeArgument(args, 1), exception);
+ if (exception)
goto fail;
- }
WebGLExtension* extension = context->getExtension(name);
Dart_Handle result = webGLExtensionToDart(extension);

Powered by Google App Engine
This is Rietveld 408576698