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

Side by Side Diff: runtime/bin/vmservice_dartium.cc

Issue 1143573003: Add dart:io and dart:_builtin to the dartium snapshot so that vmservices can work, the previous app… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/vmserviceio_dartium.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/vmservice_dartium.h" 5 #include "bin/vmservice_dartium.h"
6 6
7 #include "bin/builtin.h" 7 #include "bin/builtin.h"
8 #include "bin/dartutils.h" 8 #include "bin/dartutils.h"
9 #include "bin/eventhandler.h" 9 #include "bin/eventhandler.h"
10 #include "bin/platform.h" 10 #include "bin/platform.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 "main", 45 "main",
46 snapshot_buffer, 46 snapshot_buffer,
47 NULL, 47 NULL,
48 &error); 48 &error);
49 if (!isolate) { 49 if (!isolate) {
50 fprintf(stderr, "Dart_CreateIsolate failed: %s\n", error); 50 fprintf(stderr, "Dart_CreateIsolate failed: %s\n", error);
51 return 0; 51 return 0;
52 } 52 }
53 53
54 Dart_EnterScope(); 54 Dart_EnterScope();
55 Builtin::SetNativeResolver(Builtin::kBuiltinLibrary);
56 Builtin::SetNativeResolver(Builtin::kIOLibrary);
55 57
56 Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler);
57 Dart_Handle builtin_lib = 58 Dart_Handle builtin_lib =
58 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); 59 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
59 CHECK_RESULT(builtin_lib); 60 CHECK_RESULT(builtin_lib);
60 Dart_Handle io_lib =
61 Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary);
62 CHECK_RESULT(io_lib);
63 61
64 Dart_Handle result; 62 Dart_Handle result;
65 63
66 // Prepare for script loading by setting up the 'print' and 'timer' 64 // Prepare for script loading by setting up the 'print' and 'timer'
67 // closures and setting up 'package root' for URI resolution. 65 // closures and setting up 'package root' for URI resolution.
68 result = DartUtils::PrepareForScriptLoading(NULL, true, false, builtin_lib); 66 result = DartUtils::PrepareForScriptLoading(NULL, true, false, builtin_lib);
69 CHECK_RESULT(result); 67 CHECK_RESULT(result);
70 68
71 ASSERT(Dart_IsServiceIsolate(isolate)); 69 ASSERT(Dart_IsServiceIsolate(isolate));
72 if (!VmService::Setup(DEFAULT_VM_SERVICE_SERVER_IP, 70 if (!VmService::Setup(DEFAULT_VM_SERVICE_SERVER_IP,
(...skipping 19 matching lines...) Expand all
92 90
93 91
94 /* DISALLOW_ALLOCATION */ 92 /* DISALLOW_ALLOCATION */
95 void VmServiceServer::operator delete(void* pointer) { 93 void VmServiceServer::operator delete(void* pointer) {
96 fprintf(stderr, "unreachable code\n"); 94 fprintf(stderr, "unreachable code\n");
97 abort(); 95 abort();
98 } 96 }
99 97
100 } // namespace bin 98 } // namespace bin
101 } // namespace dart 99 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/vmserviceio_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698