Title: [292075] trunk/Source/_javascript_Core
- Revision
- 292075
- Author
- [email protected]
- Date
- 2022-03-29 15:10:45 -0700 (Tue, 29 Mar 2022)
Log Message
Web Inspector: Add check for null `entryScope` in JSC::Debugger::detach
https://bugs.webkit.org/show_bug.cgi?id=238518
Reviewed by Devin Rousso.
A virtual machine may not always have an `entryScope`, which can occur if a `JSGlobalObject` is being destructed
(which will call into `JSC::Debugger::Detach`) before a `VMEntryScope` is created or after a `VMEntryScope` has
fallen out of scope, causing the VM's `entryScope` to be null again. In the original internal issue that led to
finding this, this most commonly occurred in conjunction with page refresh while the debugger was paused.
Because it is possible that we were previously paused in the VM that now has no `entryScope`, we should go ahead
and unpause.
* debugger/Debugger.cpp:
(JSC::Debugger::detach):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (292074 => 292075)
--- trunk/Source/_javascript_Core/ChangeLog 2022-03-29 21:57:50 UTC (rev 292074)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-03-29 22:10:45 UTC (rev 292075)
@@ -1,5 +1,23 @@
2022-03-29 Patrick Angle <[email protected]>
+ Web Inspector: Add check for null `entryScope` in JSC::Debugger::detach
+ https://bugs.webkit.org/show_bug.cgi?id=238518
+
+ Reviewed by Devin Rousso.
+
+ A virtual machine may not always have an `entryScope`, which can occur if a `JSGlobalObject` is being destructed
+ (which will call into `JSC::Debugger::Detach`) before a `VMEntryScope` is created or after a `VMEntryScope` has
+ fallen out of scope, causing the VM's `entryScope` to be null again. In the original internal issue that led to
+ finding this, this most commonly occurred in conjunction with page refresh while the debugger was paused.
+
+ Because it is possible that we were previously paused in the VM that now has no `entryScope`, we should go ahead
+ and unpause.
+
+ * debugger/Debugger.cpp:
+ (JSC::Debugger::detach):
+
+2022-03-29 Patrick Angle <[email protected]>
+
Web Inspector: [Cocoa] Indicate a request was sent through proxy/private relay in Network tab
https://bugs.webkit.org/show_bug.cgi?id=233202
Modified: trunk/Source/_javascript_Core/debugger/Debugger.cpp (292074 => 292075)
--- trunk/Source/_javascript_Core/debugger/Debugger.cpp 2022-03-29 21:57:50 UTC (rev 292074)
+++ trunk/Source/_javascript_Core/debugger/Debugger.cpp 2022-03-29 22:10:45 UTC (rev 292075)
@@ -171,7 +171,7 @@
VM& vm = globalObject->vm();
JSLockHolder locker(vm);
- if (m_isPaused && m_currentCallFrame && vm.entryScope->globalObject() == globalObject) {
+ if (m_isPaused && m_currentCallFrame && (!vm.isEntered() || vm.entryScope->globalObject() == globalObject)) {
m_currentCallFrame = nullptr;
m_pauseOnCallFrame = nullptr;
continueProgram();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes