electron/shell/common
Fedor Indutny d4a1b41129
fix: microtasks policy in CreateEnvironment (#29531)
* fix: microtasks policy in CreateEnvironment

Microtasks policy should not be updated for the renderer because
`NodeBindings::CreateEnvironment` might be entered with or without
`UvRunOnce()` on stack. One of the examples of such calls is
`window.open()` which is possible to invoke while `uv_run()` is still
running (e.g. with `setImmediate()`).

All in all, it doesn't matter that much which policy we use since
`v8::MicrotasksScope` has a check for the policy in its destructor and
no commits will be made if the policy is `kExplicit`. It is important,
however, to not change the policy in the middle of `UvRunOnce()` so we
should respect whatever we currently have and move on.

Fix: #29463

* Move test to a better place

* Update spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* Update spec-main/fixtures/crash-cases/setimmediate-window-open-crash/index.html

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

* simplify crash-case

* comment

* fix comment

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2021-06-21 14:06:17 +09:00
..
api chore: remove unused and broken ipcRendererInternal.sendTo() (#29743) 2021-06-17 23:26:18 -05:00
asar fix: change ASAR archive cache to per-process to fix leak (#29293) 2021-06-04 10:49:08 +09:00
extensions chore: use =default for default constructors/destructors (#29511) 2021-06-04 13:16:13 +09:00
gin_converters chore: use std::make_unique/base::MakeRefCounted when possible (#29510) 2021-06-08 11:00:05 +09:00
gin_helper chore: bump chromium to 93.0.4530.0 (master) (#29256) 2021-06-03 01:05:04 -07:00
mac
resources/mac
application_info.cc
application_info.h
application_info_linux.cc chore: trim unused STL includes (#29414) 2021-06-01 10:34:44 +09:00
application_info_mac.mm
application_info_win.cc
color_util.cc
color_util.h
crash_keys.cc
crash_keys.h
electron_command_line.cc
electron_command_line.h chore: trim unused STL includes (#29414) 2021-06-01 10:34:44 +09:00
electron_constants.cc
electron_constants.h
electron_paths.h refactor: use PathProvider for user-data-dir and others (#29649) 2021-06-15 09:32:56 +09:00
heap_snapshot.cc
heap_snapshot.h
key_weak_map.h
keyboard_util.cc chore: bump chromium to 93.0.4530.0 (master) (#29256) 2021-06-03 01:05:04 -07:00
keyboard_util.h chore: bump chromium to 93.0.4530.0 (master) (#29256) 2021-06-03 01:05:04 -07:00
language_util.h
language_util_linux.cc
language_util_mac.mm
language_util_win.cc
logging.cc feat: bring --enable-logging functionality in line with Chromium (#25089) 2021-06-17 14:17:25 -07:00
logging.h feat: bring --enable-logging functionality in line with Chromium (#25089) 2021-06-17 14:17:25 -07:00
mouse_util.cc
mouse_util.h
node_bindings.cc fix: microtasks policy in CreateEnvironment (#29531) 2021-06-21 14:06:17 +09:00
node_bindings.h
node_bindings_linux.cc
node_bindings_linux.h
node_bindings_mac.cc chore: use =default for default constructors/destructors (#29511) 2021-06-04 13:16:13 +09:00
node_bindings_mac.h
node_bindings_win.cc chore: use =default for default constructors/destructors (#29511) 2021-06-04 13:16:13 +09:00
node_bindings_win.h
node_includes.h fix: prevent crash on web-contents creation when error is thrown (#28971) 2021-05-11 13:57:11 -07:00
node_util.cc
node_util.h
options_switches.cc feat: add new imageAnimationPolicy webpref and webContents setter (#29095) 2021-06-08 11:00:22 +09:00
options_switches.h feat: add new imageAnimationPolicy webpref and webContents setter (#29095) 2021-06-08 11:00:22 +09:00
platform_util.cc fix: shell.trashItem crash when called in renderer (#28748) 2021-04-22 13:46:41 -07:00
platform_util.h
platform_util_internal.h
platform_util_linux.cc fix: Revert "fix: don't propagate GDK_BACKEND to subprocs (#28898)" (#29610) 2021-06-09 08:28:52 -07:00
platform_util_mac.mm
platform_util_win.cc fix a messed up merge 2021-03-24 11:48:15 -07:00
process_util.cc
process_util.h
skia_util.cc
skia_util.h chore: trim unused STL includes (#29414) 2021-06-01 10:34:44 +09:00
v8_value_converter.cc chore: use std::make_unique/base::MakeRefCounted when possible (#29510) 2021-06-08 11:00:05 +09:00
v8_value_converter.h
v8_value_serializer.cc chore: bump chromium to 92.0.4505.0 (master) (#29058) 2021-05-13 21:21:36 -04:00
v8_value_serializer.h
world_ids.h