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

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

Issue 35393003: Retain script path of parent isolate when spawnFunction is called so that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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/main.cc ('k') | runtime/include/dart_api.h » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_impl.h" 5 #include "bin/vmservice_impl.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Wait until service is running on spawned thread. 77 // Wait until service is running on spawned thread.
78 ml.Wait(); 78 ml.Wait();
79 } 79 }
80 return port_ != ILLEGAL_PORT; 80 return port_ != ILLEGAL_PORT;
81 } 81 }
82 82
83 83
84 bool VmService::_Start(intptr_t server_port) { 84 bool VmService::_Start(intptr_t server_port) {
85 ASSERT(isolate_ == NULL); 85 ASSERT(isolate_ == NULL);
86 char* error = NULL; 86 char* error = NULL;
87 isolate_ = Dart_CreateIsolate("vmservice:", "main", snapshot_buffer, 87 const char* script_uri = "vmservice:";
88 new IsolateData(), 88 IsolateData* isolate_data = new IsolateData(script_uri);
89 isolate_ = Dart_CreateIsolate(script_uri, "main", snapshot_buffer,
90 isolate_data,
89 &error); 91 &error);
90 if (isolate_ == NULL) { 92 if (isolate_ == NULL) {
91 error_msg_ = error; 93 error_msg_ = error;
92 return false; 94 return false;
93 } 95 }
94 96
95 Dart_EnterScope(); 97 Dart_EnterScope();
96 98
97 if (snapshot_buffer != NULL) { 99 if (snapshot_buffer != NULL) {
98 // Setup the native resolver as the snapshot does not carry it. 100 // Setup the native resolver as the snapshot does not carry it.
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (!strcmp(function_name, entry.name) && 521 if (!strcmp(function_name, entry.name) &&
520 (num_arguments == entry.num_arguments)) { 522 (num_arguments == entry.num_arguments)) {
521 return entry.function; 523 return entry.function;
522 } 524 }
523 } 525 }
524 return NULL; 526 return NULL;
525 } 527 }
526 528
527 } // namespace bin 529 } // namespace bin
528 } // namespace dart 530 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698