mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
Delete code related to FLAG_i_like_slow_isolate_spawn which was only used in dartium.
Change-Id: I7dd9d8d825253146c9b1c04216cc63fbf7aa9ba7 Reviewed-on: https://dart-review.googlesource.com/11251 Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
parent
c35813a4a4
commit
e1f107973d
2 changed files with 2 additions and 24 deletions
|
@ -25,11 +25,6 @@
|
|||
|
||||
namespace dart {
|
||||
|
||||
DEFINE_FLAG(bool,
|
||||
i_like_slow_isolate_spawn,
|
||||
false,
|
||||
"Block the parent thread when loading spawned isolates.");
|
||||
|
||||
static uint8_t* malloc_allocator(uint8_t* ptr,
|
||||
intptr_t old_size,
|
||||
intptr_t new_size) {
|
||||
|
@ -254,15 +249,7 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 10) {
|
|||
ThreadPool::Task* spawn_task = new SpawnIsolateTask(state);
|
||||
|
||||
isolate->IncrementSpawnCount();
|
||||
if (FLAG_i_like_slow_isolate_spawn) {
|
||||
// We block the parent isolate while the child isolate loads.
|
||||
Isolate* saved = Isolate::Current();
|
||||
Thread::ExitIsolate();
|
||||
spawn_task->Run();
|
||||
delete spawn_task;
|
||||
spawn_task = NULL;
|
||||
Thread::EnterIsolate(saved);
|
||||
} else if (!Dart::thread_pool()->Run(spawn_task)) {
|
||||
if (!Dart::thread_pool()->Run(spawn_task)) {
|
||||
// Running on the thread pool failed. Clean up everything.
|
||||
state->DecrementSpawnCount();
|
||||
delete state;
|
||||
|
@ -399,15 +386,7 @@ DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 12) {
|
|||
ThreadPool::Task* spawn_task = new SpawnIsolateTask(state);
|
||||
|
||||
isolate->IncrementSpawnCount();
|
||||
if (FLAG_i_like_slow_isolate_spawn) {
|
||||
// We block the parent isolate while the child isolate loads.
|
||||
Isolate* saved = Isolate::Current();
|
||||
Thread::ExitIsolate();
|
||||
spawn_task->Run();
|
||||
delete spawn_task;
|
||||
spawn_task = NULL;
|
||||
Thread::EnterIsolate(saved);
|
||||
} else if (!Dart::thread_pool()->Run(spawn_task)) {
|
||||
if (!Dart::thread_pool()->Run(spawn_task)) {
|
||||
// Running on the thread pool failed. Clean up everything.
|
||||
state->DecrementSpawnCount();
|
||||
delete state;
|
||||
|
|
|
@ -67,7 +67,6 @@ class ThreadRegistry {
|
|||
// zones/handles in the API scope :
|
||||
// - Dart_RunLoop()
|
||||
// - IsolateSaver in Dart_NewNativePort
|
||||
// - Isolate spawn (function/uri) under FLAG_i_like_slow_isolate_spawn
|
||||
// Similarly, tracking async_stack_trace requires that we always reschedule
|
||||
// on the same thread.
|
||||
// We probably need a mechanism to return to the specific thread only
|
||||
|
|
Loading…
Reference in a new issue