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

Unified Diff: runtime/lib/isolate.cc

Issue 474913004: - Account for number of pending tasks in old-space collections. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/heap.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate.cc
===================================================================
--- runtime/lib/isolate.cc (revision 39381)
+++ runtime/lib/isolate.cc (working copy)
@@ -139,9 +139,9 @@
}
-static bool CreateIsolate(IsolateSpawnState* state, char** error) {
- Isolate* parent_isolate = Isolate::Current();
-
+static bool CreateIsolate(Isolate* parent_isolate,
+ IsolateSpawnState* state,
+ char** error) {
Dart_IsolateCreateCallback callback = Isolate::CreateCallback();
if (callback == NULL) {
*error = strdup("Null callback specified for isolate creation\n");
@@ -166,10 +166,11 @@
}
-static RawObject* Spawn(NativeArguments* arguments, IsolateSpawnState* state) {
+static RawObject* Spawn(Isolate* parent_isolate,
+ IsolateSpawnState* state) {
// Create a new isolate.
char* error = NULL;
- if (!CreateIsolate(state, &error)) {
+ if (!CreateIsolate(parent_isolate, state, &error)) {
delete state;
const String& msg = String::Handle(String::New(error));
free(error);
@@ -213,7 +214,7 @@
ctx = Closure::context(closure);
ASSERT(ctx.num_variables() == 0);
#endif
- return Spawn(arguments, new IsolateSpawnState(func));
+ return Spawn(isolate, new IsolateSpawnState(func));
}
}
const String& msg = String::Handle(String::New(
@@ -237,7 +238,7 @@
ThrowIsolateSpawnException(msg);
}
- return Spawn(arguments, new IsolateSpawnState(canonical_uri));
+ return Spawn(isolate, new IsolateSpawnState(canonical_uri));
}
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl_test.cc » ('j') | runtime/vm/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698