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

Unified Diff: sky/engine/tonic/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
« no previous file with comments | « sky/engine/tonic/dart_state.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/tonic/dart_state.cc
diff --git a/sky/engine/tonic/dart_state.cc b/sky/engine/tonic/dart_state.cc
index 70faa05cd66d23e4fbbb0cf8a9c380c5c75ed6ac..42ef6d5004d7f731d6e2c9b85f95f42d78a9576d 100644
--- a/sky/engine/tonic/dart_state.cc
+++ b/sky/engine/tonic/dart_state.cc
@@ -6,6 +6,7 @@
#include "sky/engine/tonic/dart_state.h"
#include "sky/engine/tonic/dart_class_library.h"
+#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/tonic/dart_exception_factory.h"
#include "sky/engine/tonic/dart_string_cache.h"
#include "sky/engine/tonic/dart_timer_heap.h"
@@ -31,6 +32,13 @@ DartState::DartState()
DartState::~DartState() {
}
+void DartState::DidSetIsolateInternal() {
+ Scope dart_scope(this);
+ index_handle_.Set(this, ToDart("index"));
+
+ DidSetIsolate();
abarth-chromium 2015/06/09 19:51:37 Do we want dart_scope to be on the stack while we'
Matt Perry 2015/06/09 19:52:47 Yeah I could go either way.
Matt Perry 2015/06/09 19:55:39 Went back to the old way since it's less mysteriou
+}
+
DartState* DartState::From(Dart_Isolate isolate) {
return static_cast<DartState*>(Dart_IsolateData(isolate));
}
« no previous file with comments | « sky/engine/tonic/dart_state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698