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

Unified Diff: sky/engine/core/frame/LocalDOMWindow.cpp

Issue 1131673011: Teach SkyView code path to print hello, world (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: again 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 | « no previous file | sky/engine/core/script/dart_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/LocalDOMWindow.cpp
diff --git a/sky/engine/core/frame/LocalDOMWindow.cpp b/sky/engine/core/frame/LocalDOMWindow.cpp
index 16e1da3ced33563888d3423216537dc12a9bfb3d..237949a3267dc4e07d56a0a360bb29681f108784 100644
--- a/sky/engine/core/frame/LocalDOMWindow.cpp
+++ b/sky/engine/core/frame/LocalDOMWindow.cpp
@@ -65,6 +65,7 @@
#include "sky/engine/core/page/Page.h"
#include "sky/engine/core/rendering/style/RenderStyle.h"
#include "sky/engine/core/script/dart_controller.h"
+#include "sky/engine/core/script/dom_dart_state.h"
#include "sky/engine/platform/EventDispatchForbiddenScope.h"
#include "sky/engine/platform/PlatformScreen.h"
#include "sky/engine/platform/geometry/FloatRect.h"
@@ -226,9 +227,16 @@ PassRefPtr<Document> LocalDOMWindow::installNewDocument(const DocumentInit& init
m_document = Document::create(init);
m_application = Application::create(m_document.get(), m_document.get(), m_document->url().string());
m_eventQueue = DOMWindowEventQueue::create(m_document.get());
- m_frame->dart().CreateIsolateFor(m_document.get());
- m_document->attach();
+ m_frame->dart().CreateIsolateFor(adoptPtr(new DOMDartState(m_document.get())), m_document->url());
+
+ {
+ Dart_Isolate isolate = m_frame->dart().dart_state()->isolate();
+ DartIsolateScope scope(isolate);
+ DartApiScope api_scope;
+ m_document->frame()->loaderClient()->didCreateIsolate(isolate);
+ }
+ m_document->attach();
return m_document;
}
« no previous file with comments | « no previous file | sky/engine/core/script/dart_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698