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

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

Issue 1145103005: Add DartHandleCache and use it to cache strings used when converting Rect and (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: simplify Created 5 years, 7 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/core/script/dom_dart_state.h ('k') | sky/engine/tonic/dart_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8f5784b58259a3bb6bd310deffb4bd253daf3a8e..2e2d8ecc7d056c24fbe1b47f873688e3b9808c13 100644
--- a/sky/engine/core/script/dom_dart_state.cc
+++ b/sky/engine/core/script/dom_dart_state.cc
@@ -11,12 +11,20 @@
namespace blink {
DOMDartState::DOMDartState(Document* document)
- : document_(document), loader_(adoptPtr(new DartLoader(this))) {
+ : document_(document),
+ loader_(adoptPtr(new DartLoader(this))) {
}
DOMDartState::~DOMDartState() {
}
+void DOMDartState::DidSetIsolate() {
+ Scope dart_scope(this);
+ x_handle_.Set(this, Dart_NewStringFromCString("x"));
+ y_handle_.Set(this, Dart_NewStringFromCString("y"));
+ value_handle_.Set(this, Dart_NewStringFromCString("_value"));
+}
+
DOMDartState* DOMDartState::Current() {
return static_cast<DOMDartState*>(DartState::Current());
}
@@ -35,4 +43,4 @@ LocalDOMWindow* DOMDartState::CurrentWindow() {
return Current()->document_->domWindow();
}
-}
+} // namespace blink
« no previous file with comments | « sky/engine/core/script/dom_dart_state.h ('k') | sky/engine/tonic/dart_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698