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

Unified Diff: runtime/vm/isolate.cc

Issue 145323002: Post-meetup feature extravaganza. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 32027)
+++ runtime/vm/isolate.cc (working copy)
@@ -104,6 +104,9 @@
StartIsolateScope start_scope(isolate_);
StackZone zone(isolate_);
HandleScope handle_scope(isolate_);
+ // TODO(turnidge): Rework collection total dart execution. This can
+ // overcount when other things (gc, compilation) are active.
+ TIMERSCOPE(time_dart_execution);
// If the message is in band we lookup the receive port to dispatch to. If
// the receive port is closed, we drop the message without deserializing it.
@@ -300,7 +303,7 @@
stack_limit_(0),
saved_stack_limit_(0),
message_handler_(NULL),
- spawn_data_(0),
+ spawn_state_(NULL),
is_runnable_(false),
gc_prologue_callbacks_(),
gc_epilogue_callbacks_(),
@@ -336,6 +339,7 @@
message_handler_ = NULL; // Fail fast if we send messages to a dead isolate.
ASSERT(deopt_context_ == NULL); // No deopt in progress when isolate deleted.
delete object_histogram_;
+ delete spawn_state_;
}
void Isolate::SetCurrent(Isolate* current) {
@@ -498,7 +502,7 @@
// Set the isolate as runnable and if we are being spawned schedule
// isolate on thread pool for execution.
is_runnable_ = true;
- IsolateSpawnState* state = reinterpret_cast<IsolateSpawnState*>(spawn_data());
+ IsolateSpawnState* state = spawn_state();
if (state != NULL) {
ASSERT(this == state->isolate());
Run();
@@ -518,9 +522,9 @@
Isolate* isolate = reinterpret_cast<Isolate*>(parameter);
IsolateSpawnState* state = NULL;
{
+ // TODO(turnidge): Is this locking required here at all anymore?
MutexLocker ml(isolate->mutex());
- state = reinterpret_cast<IsolateSpawnState*>(isolate->spawn_data());
- isolate->set_spawn_data(0);
+ state = isolate->spawn_state();
}
{
StartIsolateScope start_scope(isolate);
@@ -540,8 +544,6 @@
Object& result = Object::Handle();
result = state->ResolveFunction();
bool is_spawn_uri = state->is_spawn_uri();
- delete state;
- state = NULL;
if (result.IsError()) {
StoreError(isolate, result);
return false;

Powered by Google App Engine
This is Rietveld 408576698