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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 1344993002: Refactor isolate interrupts to use OOB messages instead of interrupt bits. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: code review 2 Created 5 years, 3 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index e47d14e0f754c21b2c910ee6deab5b37918e1b99..9271c745302295db60ba0b1298ec281967a22782 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1596,16 +1596,7 @@ DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate) {
}
// TODO(16615): Validate isolate parameter.
Isolate* iso = reinterpret_cast<Isolate*>(isolate);
- // Schedule the interrupt. The isolate will notice this bit being set if it
- // is currently executing in Dart code.
- iso->ScheduleInterrupts(Isolate::kApiInterrupt);
- // If the isolate is blocked on the message queue, we post a dummy message
- // to the isolate's main port. The message will be ultimately ignored, but as
- // part of handling the message the interrupt bit which was set above will be
- // honored.
- // Can't use Dart_Post() since there isn't a current isolate.
- Dart_CObject api_null = { Dart_CObject_kNull , { 0 } };
- Dart_PostCObject(iso->main_port(), &api_null);
+ iso->SendInternalLibMessage(Isolate::kInterruptMsg, iso->pause_capability());
}
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698