Chromium Code Reviews| Index: Source/WebCore/bindings/dart/custom/DartArrayBufferViewCustom.h |
| diff --git a/Source/WebCore/bindings/dart/custom/DartArrayBufferViewCustom.h b/Source/WebCore/bindings/dart/custom/DartArrayBufferViewCustom.h |
| index 8fa691c9eb2bb3f5ce82c981000c7523f7a43957..dccf637f43d08430345c5c05742f46aabc0f0602 100644 |
| --- a/Source/WebCore/bindings/dart/custom/DartArrayBufferViewCustom.h |
| +++ b/Source/WebCore/bindings/dart/custom/DartArrayBufferViewCustom.h |
| @@ -45,7 +45,7 @@ void constructWebGLArray(Dart_NativeArguments args) |
| DartApiScope dartApiScope; |
| Dart_Handle exception; |
| { |
| - Dart_Handle arg1 = Dart_GetNativeArgument(args, 1); |
| + Dart_Handle arg1 = Dart_GetNativeArgument(args, 0); |
|
antonm
2012/01/25 18:56:40
shouldn't you rename construct into something else
podivilov
2012/01/25 19:04:05
I think construct is the right name, as we constru
Anton Muhin
2012/01/26 12:13:35
I think factory is ways better.
My understanding:
podivilov
2012/01/30 18:27:54
Done.
|
| RefPtr<ArrayClass> array; |
| if (Dart_IsNumber(arg1)) { |
| ParameterAdapter<int> length(arg1); |
| @@ -63,7 +63,9 @@ void constructWebGLArray(Dart_NativeArguments args) |
| array = ArrayClass::create(list->data(), list->size()); |
| } |
| // FIXME: also process 3 argument constructor. |
| - DartDOMWrapper::bindDOMObjectToDartWrapper(array.get(), Dart_GetNativeArgument(args, 0)); |
| + Dart_Handle result = toDartValue(array.get()); |
| + if (result) |
|
Anton Muhin
2012/01/26 12:13:35
care to add comment why you don't use ::returnValu
|
| + Dart_SetReturnValue(args, result); |
| return; |
| } |