| Index: Source/WebCore/bindings/dart/DartDOMWrapper.h
|
| diff --git a/Source/WebCore/bindings/dart/DartDOMWrapper.h b/Source/WebCore/bindings/dart/DartDOMWrapper.h
|
| index 8cea9a2d68030b1d827a43fc7a25bcd5d17e1caa..999da8139145cd75d161e3c4c3977bcef3a7420e 100644
|
| --- a/Source/WebCore/bindings/dart/DartDOMWrapper.h
|
| +++ b/Source/WebCore/bindings/dart/DartDOMWrapper.h
|
| @@ -247,90 +247,6 @@ private:
|
| }
|
| };
|
|
|
| -// ParameterAdapter.
|
| -
|
| -template <typename Value>
|
| -class ParameterAdapterBase {
|
| -public:
|
| - bool conversionSuccessful() const { return !m_exception; }
|
| -
|
| - Dart_Handle exception() const
|
| - {
|
| - ASSERT(!conversionSuccessful());
|
| - return m_exception;
|
| - }
|
| -
|
| -protected:
|
| -
|
| - ParameterAdapterBase()
|
| - : m_value()
|
| - , m_exception(0) { }
|
| -
|
| - void setException(Dart_Handle exception)
|
| - {
|
| - ASSERT(exception);
|
| - m_exception = exception;
|
| - ASSERT(!conversionSuccessful());
|
| - }
|
| -
|
| - const Value& value() const
|
| - {
|
| - ASSERT(conversionSuccessful());
|
| - return m_value;
|
| - }
|
| -
|
| - void setValue(Value value)
|
| - {
|
| - m_value = value;
|
| - }
|
| -
|
| -protected:
|
| - Value m_value;
|
| -
|
| - template <class C>
|
| - void init(C* c, Dart_Handle handle)
|
| - {
|
| - Dart_Handle exception = 0;
|
| - this->setValue(c->convert(handle, exception));
|
| - if (exception)
|
| - this->setException(exception);
|
| - }
|
| -
|
| - template <class C>
|
| - void init(C* c, Dart_Handle handle, DartUtilities::ConversionFlag conversionFlag)
|
| - {
|
| - if (conversionFlag == DartUtilities::ConvertNullToDefaultValue) {
|
| - if (Dart_IsNull(handle))
|
| - return;
|
| - }
|
| - Dart_Handle exception = 0;
|
| - this->setValue(c->convert(handle, exception));
|
| - if (exception)
|
| - this->setException(exception);
|
| - }
|
| -
|
| -private:
|
| - Dart_Handle m_exception;
|
| -};
|
| -
|
| -template <class DartBindingsClass>
|
| -class ParameterAdapter {};
|
| -
|
| -// FIXME: [performance] need better treatment of String vs. AtomicString, cf. v8 implementation.
|
| -template <>
|
| -class ParameterAdapter<String> : public ParameterAdapterBase< RefPtr<StringImpl> > {
|
| -public:
|
| - explicit ParameterAdapter(Dart_Handle handle, DartUtilities::ConversionFlag flag = DartUtilities::ConvertNone)
|
| - {
|
| - Dart_Handle exception = 0;
|
| - setValue(DartUtilities::toStringImpl(handle, flag, exception));
|
| - if (exception)
|
| - setException(exception);
|
| - }
|
| - operator String() const { return String(this->value()); }
|
| - operator AtomicString() const { return AtomicString(this->value()); }
|
| -};
|
| -
|
| }
|
|
|
| #endif // DartDOMWrapper_h
|
|
|