Chromium Code Reviews| Index: WebCore/bindings/dart/DartController.cpp |
| =================================================================== |
| --- WebCore/bindings/dart/DartController.cpp (revision 864) |
| +++ WebCore/bindings/dart/DartController.cpp (working copy) |
| @@ -74,10 +74,13 @@ |
| Dart_Handle library = Dart_LookupLibrary(Dart_NewString(targetLibrary)); |
| ASSERT(!Dart_IsError(library)); |
| - Dart_Handle cls = Dart_GetClass(library, Dart_NewString(targetClass)); |
| - ASSERT(!Dart_IsError(cls)); |
| - |
| - Dart_SetField(cls, Dart_NewString(targetField), value); |
| + if (targetClass) { |
|
Anton Muhin
2012/09/12 14:50:54
Please, to keep the cases as similar as they can b
Mads Ager (google)
2012/09/13 07:17:42
Done.
|
| + Dart_Handle cls = Dart_GetClass(library, Dart_NewString(targetClass)); |
| + ASSERT(!Dart_IsError(cls)); |
| + Dart_SetField(cls, Dart_NewString(targetField), value); |
|
Anton Muhin
2012/09/12 14:50:54
nit: 4 spaces for indent.
Mads Ager (google)
2012/09/13 07:17:42
Thanks. Code is now gone.
|
| + } else { |
| + Dart_SetField(library, Dart_NewString(targetField), value); |
| + } |
| } |
| static void initDOMIsolate() |
| @@ -93,7 +96,7 @@ |
| Dart_LibraryImportLibrary(core, html, Dart_Null()); |
| // Setup configuration closures |
| - copyValue(html, "_printClosure", "dart:coreimpl", "PrintImplementation", "_printClosure"); |
| + copyValue(html, "_printClosure", "dart:core", 0, "_printClosure"); |
|
Anton Muhin
2012/09/12 14:50:54
cannot we unify this stuff and use class for print
Mads Ager (google)
2012/09/13 07:17:42
We could but I don't think we want to put that req
Anton Muhin
2012/09/13 07:25:33
That'd be cool.
On 2012/09/13 07:17:42, Mads Ager
|
| copyValue(html, "_timerFactoryClosure", "dart:isolate", "_TimerFactory", "_factory"); |
| } |