-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inspector: turn platform tasks that outlive Agent into no-ops #30031
Conversation
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code).
I’m reviewing from the phone so I am not sure if I captured the details of the change. It looks like this is the scenario where MainThreadHeandle is supposed to be used... I will try to do a better review this weekend. |
@eugeneo Take your time :) I’m not sure how |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for looking into this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm :)
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code). PR-URL: #30031 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Landed in 7a82e5e |
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code). PR-URL: #30031 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code). PR-URL: #30031 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code). PR-URL: #30031 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Turn tasks scheduled on the `v8::Isolate` or on the given platform into no-ops if the underlying `MainThreadInterface` has gone away before the task could be run (which would happen when the `Environment` instance and with it the `inspector::Agent` instance are destroyed). This addresses an issue that Electron has been having with inspector support, and generally just seems like the right thing to do, as we may not fully be in control of the relative timing of Environment teardown, platform tasksexecution, and the execution of `RequestInterrupt()` callbacks (although the former two always happen in the same order in our own code). PR-URL: #30031 Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Turn tasks scheduled on the
v8::Isolate
or on the given platforminto no-ops if the underlying
MainThreadInterface
has gone awaybefore the task could be run (which would happen when the
Environment
instance and with it theinspector::Agent
instanceare destroyed).
This addresses an issue that Electron has been having with
inspector support, and generally just seems like the right thing
to do, as we may not fully be in control of the relative timing
of Environment teardown, platform tasks execution, and the
execution of
RequestInterrupt()
callbacks (althoughthe former two always happen in the same order in our own code).
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes