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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011, Google Inc. 1 // Copyright 2011, Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 { 257 {
258 getObjectParameter(args, kBuffer); 258 getObjectParameter(args, kBuffer);
259 } 259 }
260 260
261 void getExtensionCallback(Dart_NativeArguments args) 261 void getExtensionCallback(Dart_NativeArguments args)
262 { 262 {
263 DartApiScope dartApiScope; 263 DartApiScope dartApiScope;
264 Dart_Handle exception = 0; 264 Dart_Handle exception = 0;
265 { 265 {
266 WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRendering Context>(args); 266 WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRendering Context>(args);
267 const ParameterAdapter<String> name(Dart_GetNativeArgument(args, 1)); 267 DartStringAdapter name = DartUtilities::dartToString(Dart_GetNativeArgum ent(args, 1), exception);
268 if (!name.conversionSuccessful()) { 268 if (exception)
269 exception = name.exception();
270 goto fail; 269 goto fail;
271 }
272 270
273 WebGLExtension* extension = context->getExtension(name); 271 WebGLExtension* extension = context->getExtension(name);
274 Dart_Handle result = webGLExtensionToDart(extension); 272 Dart_Handle result = webGLExtensionToDart(extension);
275 if (!DartUtilities::checkResult(result, exception)) 273 if (!DartUtilities::checkResult(result, exception))
276 goto fail; 274 goto fail;
277 Dart_SetReturnValue(args, result); 275 Dart_SetReturnValue(args, result);
278 return; 276 return;
279 } 277 }
280 278
281 fail: 279 fail:
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 void vertexAttrib4fvCallback(Dart_NativeArguments args) 729 void vertexAttrib4fvCallback(Dart_NativeArguments args)
732 { 730 {
733 vertexAttribAndUniformHelperf(args, kVertexAttrib4v); 731 vertexAttribAndUniformHelperf(args, kVertexAttrib4v);
734 } 732 }
735 733
736 } 734 }
737 735
738 } 736 }
739 737
740 #endif // ENABLE(WEBGL) 738 #endif // ENABLE(WEBGL)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698