| Index: sky/engine/tonic/dart_converter.h
|
| diff --git a/sky/engine/tonic/dart_converter.h b/sky/engine/tonic/dart_converter.h
|
| index 2982589da56a95b3703c248bfb7d12825e1b16a8..c40fe5383dc69a0dd30bdf9df9d937c742430342 100644
|
| --- a/sky/engine/tonic/dart_converter.h
|
| +++ b/sky/engine/tonic/dart_converter.h
|
| @@ -269,7 +269,7 @@ struct DartConverter<Vector<T>> {
|
| // DartValue
|
|
|
| template <>
|
| -struct DartConverter<DartValue> {
|
| +struct DartConverter<DartValue*> {
|
| static Dart_Handle ToDart(DartState* state, DartValue* val) {
|
| return val->dart_value();
|
| }
|
| @@ -277,6 +277,18 @@ struct DartConverter<DartValue> {
|
| static void SetReturnValue(Dart_NativeArguments args, DartValue* val) {
|
| Dart_SetReturnValue(args, val->dart_value());
|
| }
|
| +
|
| + static PassRefPtr<DartValue> FromDart(Dart_Handle handle) {
|
| + return DartValue::Create(DartState::Current(), handle);
|
| + }
|
| +
|
| + static PassRefPtr<DartValue> FromArguments(Dart_NativeArguments args,
|
| + int index,
|
| + Dart_Handle& exception,
|
| + bool auto_scope = true) {
|
| + // TODO(abarth): What should we do with auto_scope?
|
| + return FromDart(Dart_GetNativeArgument(args, index));
|
| + }
|
| };
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
|
|