OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sky/engine/config.h" | 5 #include "sky/engine/config.h" |
6 #include "sky/engine/core/script/dart_controller.h" | 6 #include "sky/engine/core/script/dart_controller.h" |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 { | 251 { |
252 DartApiScope apiScope; | 252 DartApiScope apiScope; |
253 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); | 253 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); |
254 Builtin::SetNativeResolver(Builtin::kMojoInternalLibrary); | 254 Builtin::SetNativeResolver(Builtin::kMojoInternalLibrary); |
255 Builtin::SetNativeResolver(Builtin::kIOLibrary); | 255 Builtin::SetNativeResolver(Builtin::kIOLibrary); |
256 BuiltinNatives::Init(BuiltinNatives::DartIOIsolate); | 256 BuiltinNatives::Init(BuiltinNatives::DartIOIsolate); |
257 // Start the handle watcher from the service isolate so it isn't available | 257 // Start the handle watcher from the service isolate so it isn't available |
258 // for debugging or general Observatory interaction. | 258 // for debugging or general Observatory interaction. |
259 EnsureHandleWatcherStarted(); | 259 EnsureHandleWatcherStarted(); |
260 std::string ip = "127.0.0.1"; | 260 std::string ip = "127.0.0.1"; |
261 const intptr_t port = 0; // Automatic port assignment. | 261 const intptr_t port = 8181; // DO NOT COMMIT |
eseidel
2015/05/21 18:06:16
Do not commit?
| |
262 const bool service_isolate_booted = | 262 const bool service_isolate_booted = |
263 DartServiceIsolate::Startup(ip, port, LibraryTagHandler, error); | 263 DartServiceIsolate::Startup(ip, port, LibraryTagHandler, error); |
264 CHECK(service_isolate_booted) << error; | 264 CHECK(service_isolate_booted) << error; |
265 } | 265 } |
266 Dart_ExitIsolate(); | 266 Dart_ExitIsolate(); |
267 return isolate; | 267 return isolate; |
268 } | 268 } |
269 | 269 |
270 // Create & start the handle watcher isolate | 270 // Create & start the handle watcher isolate |
271 CHECK(kDartIsolateSnapshotBuffer); | 271 CHECK(kDartIsolateSnapshotBuffer); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 nullptr, // Isolate interrupt callback. | 381 nullptr, // Isolate interrupt callback. |
382 UnhandledExceptionCallback, IsolateShutdownCallback, | 382 UnhandledExceptionCallback, IsolateShutdownCallback, |
383 // File IO callbacks. | 383 // File IO callbacks. |
384 nullptr, nullptr, nullptr, nullptr, nullptr)); | 384 nullptr, nullptr, nullptr, nullptr, nullptr)); |
385 // Wait for load port- ensures handle watcher and service isolates are | 385 // Wait for load port- ensures handle watcher and service isolates are |
386 // running. | 386 // running. |
387 Dart_ServiceWaitForLoadPort(); | 387 Dart_ServiceWaitForLoadPort(); |
388 } | 388 } |
389 | 389 |
390 } // namespace blink | 390 } // namespace blink |
OLD | NEW |