Chromium Code Reviews| Index: Source/bindings/dart/DartController.cpp |
| =================================================================== |
| --- Source/bindings/dart/DartController.cpp (revision 1462) |
| +++ Source/bindings/dart/DartController.cpp (working copy) |
| @@ -30,6 +30,11 @@ |
| #include "config.h" |
| #include "bindings/dart/DartController.h" |
| +#if defined(ANDROID) |
| +#include <sys/system_properties.h> |
| +#endif |
| + |
| + |
| #include "DartDocument.h" |
| #include "DartWindow.h" |
| #include "HTMLNames.h" |
| @@ -179,9 +184,18 @@ |
| domData->setTypedDataLibrary(Dart_NewPersistentHandle(typedData)); |
| // Setup configuration closures |
| +#if defined(ANDROID) |
| + char forwardingProperty[PROP_VALUE_MAX]; |
| + int propLen = |
| + __system_property_get("DART_FORWARDING_PRINT", &forwardingProperty[0]); |
| + const char * const printClosure = (propLen > 0) ? |
|
Anton Muhin
2013/10/24 06:01:50
maybe introduce bool forwardPrint which is platfor
|
| + "_forwardingPrintClosure" : |
| + (isDOMEnabled ? "_printClosure" : "_pureIsolatePrintClosure"); |
| +#else |
| const char * const printClosure = getenv("DART_FORWARDING_PRINT") ? |
| "_forwardingPrintClosure" : |
| (isDOMEnabled ? "_printClosure" : "_pureIsolatePrintClosure"); |
| +#endif |
| copyValue(html, printClosure, "dart:_collection-dev", 0, "_printClosure"); |
| copyValue(html, isDOMEnabled ? "_timerFactoryClosure" : "_pureIsolateTimerFactoryClosure", "dart:async", "_TimerFactory", "_factory"); |
| copyValue(html, isDOMEnabled ? "_scheduleImmediateClosure" : "_pureIsolateScheduleImmediateClosure", "dart:async", "_ScheduleImmediate", "_closure"); |