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

Unified Diff: Source/bindings/dart/DartController.cpp

Issue 38323002: On Android uses system properties instead of environment variables. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit/
Patch Set: Created 7 years, 2 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/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");
« 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