| Index: Source/WebCore/bindings/dart/DartDOMWrapper.cpp
|
| diff --git a/Source/WebCore/bindings/dart/DartDOMWrapper.cpp b/Source/WebCore/bindings/dart/DartDOMWrapper.cpp
|
| index f046b33ccc8245d24d20ebaeece81e5428b3f8d9..417f8a1789015b53b85baf15d796e7773f2cbe80 100644
|
| --- a/Source/WebCore/bindings/dart/DartDOMWrapper.cpp
|
| +++ b/Source/WebCore/bindings/dart/DartDOMWrapper.cpp
|
| @@ -46,18 +46,15 @@ namespace WebCore {
|
|
|
| Dart_Handle DartDOMWrapper::instantiateWrapper(const char* className)
|
| {
|
| - // FIXME: this all is very ugly, but we're blocked by API here.
|
| - // In this case we need an API to invoke ctor, or even better,
|
| - // create an instance without exposing constructor at all.
|
| - String factoryMethodName = String("_create") + className;
|
| Dart_Handle html = DartUtilities::htmlLibraryForCurrentIsolate();
|
| ASSERT(!Dart_IsError(html));
|
|
|
| Dart_Handle cls = Dart_GetClass(html, Dart_NewString(className));
|
| ASSERT(!Dart_IsError(cls));
|
|
|
| - Dart_Handle instance = Dart_Invoke(cls, DartUtilities::stringToDartString(factoryMethodName), 0, 0);
|
| + Dart_Handle instance = Dart_New(cls, Dart_Null(), 0, 0);
|
| ASSERT(!Dart_IsError(instance));
|
| +
|
| return instance;
|
| }
|
|
|
|
|