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

Unified Diff: sky/engine/core/script/dom_dart_state.cc

Issue 1170963003: Sky: Add a DartConverterEnum and use that for all our enum needs. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: rebase Created 5 years, 6 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
Index: sky/engine/core/script/dom_dart_state.cc
diff --git a/sky/engine/core/script/dom_dart_state.cc b/sky/engine/core/script/dom_dart_state.cc
index 5a42ddf19cedcb3099590a9941db7cad26b89f9c..6a235535f0c514362dcb0636bb827ba38863380f 100644
--- a/sky/engine/core/script/dom_dart_state.cc
+++ b/sky/engine/core/script/dom_dart_state.cc
@@ -19,11 +19,9 @@ DOMDartState::~DOMDartState() {
}
void DOMDartState::DidSetIsolate() {
- Scope dart_scope(this);
- x_handle_.Set(this, Dart_NewStringFromCString("x"));
- y_handle_.Set(this, Dart_NewStringFromCString("y"));
- index_handle_.Set(this, Dart_NewStringFromCString("index"));
- value_handle_.Set(this, Dart_NewStringFromCString("_value"));
+ x_handle_.Set(this, ToDart("x"));
+ y_handle_.Set(this, ToDart("y"));
+ value_handle_.Set(this, ToDart("_value"));
Dart_Handle sky_library = DartBuiltin::LookupLibrary("dart:sky");
color_class_.Set(this, Dart_GetType(sky_library, ToDart("Color"), 0, 0));

Powered by Google App Engine
This is Rietveld 408576698