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

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

Issue 1047883002: gen_snapshot now generates two snapshot buffers, one for the vm isolate (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: update dart revision Created 5 years, 9 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/bindings/snapshot.cc.tmpl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dart_controller.cc
diff --git a/sky/engine/core/script/dart_controller.cc b/sky/engine/core/script/dart_controller.cc
index 3fa1fbb45a7f47daf20112fc844e26faaedb3c9a..2a05e58855233c32072551cf6226ece0e1de2935 100644
--- a/sky/engine/core/script/dart_controller.cc
+++ b/sky/engine/core/script/dart_controller.cc
@@ -46,7 +46,8 @@ static const char* kCheckedModeArgs[] = {
};
#endif
-extern const uint8_t* kDartSnapshotBuffer;
+extern const uint8_t* kDartVmIsolateSnapshotBuffer;
+extern const uint8_t* kDartIsolateSnapshotBuffer;
DartController::DartController() {
}
@@ -185,15 +186,15 @@ static Dart_Isolate IsolateCreateCallback(const char* script_uri,
char** error) {
if (IsServiceIsolateURL(script_uri)) {
- return Dart_CreateIsolate(script_uri, "main", kDartSnapshotBuffer, nullptr,
- error);
+ return Dart_CreateIsolate(script_uri, "main", kDartIsolateSnapshotBuffer,
+ nullptr, error);
}
// Create & start the handle watcher isolate
- CHECK(kDartSnapshotBuffer);
+ CHECK(kDartIsolateSnapshotBuffer);
DartState* dart_state = new DartState();
Dart_Isolate isolate = Dart_CreateIsolate("sky:handle_watcher", "",
- kDartSnapshotBuffer, dart_state, error);
+ kDartIsolateSnapshotBuffer, dart_state, error);
CHECK(isolate) << error;
dart_state->set_isolate(isolate);
@@ -257,11 +258,11 @@ static void EnsureHandleWatcherStarted() {
void DartController::CreateIsolateFor(Document* document) {
DCHECK(document);
- CHECK(kDartSnapshotBuffer);
+ CHECK(kDartIsolateSnapshotBuffer);
char* error = nullptr;
dom_dart_state_ = adoptPtr(new DOMDartState(document));
Dart_Isolate isolate = Dart_CreateIsolate(
- document->url().string().utf8().data(), "main", kDartSnapshotBuffer,
+ document->url().string().utf8().data(), "main", kDartIsolateSnapshotBuffer,
static_cast<DartState*>(dom_dart_state_.get()), &error);
Dart_SetMessageNotifyCallback(MessageNotifyCallback);
CHECK(isolate) << error;
@@ -304,7 +305,8 @@ void DartController::InitVM() {
#endif
CHECK(Dart_SetVMFlags(argc, argv));
- CHECK(Dart_Initialize(IsolateCreateCallback,
+ CHECK(Dart_Initialize(kDartVmIsolateSnapshotBuffer,
+ IsolateCreateCallback,
nullptr, // Isolate interrupt callback.
UnhandledExceptionCallback, IsolateShutdownCallback,
// File IO callbacks.
« no previous file with comments | « sky/engine/bindings/snapshot.cc.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698