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

Unified Diff: Source/WebCore/bindings/dart/DartDOMWrapper.cpp

Issue 10453030: Use newly added Dart_New for wrappers instantiation. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: . Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698