Title: [292662] branches/safari-613-branch/Source/_javascript_Core
- Revision
- 292662
- Author
- [email protected]
- Date
- 2022-04-08 17:14:21 -0700 (Fri, 08 Apr 2022)
Log Message
Cherry-pick r292075. rdar://problem/88323776
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):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/_javascript_Core/ChangeLog (292661 => 292662)
--- branches/safari-613-branch/Source/_javascript_Core/ChangeLog 2022-04-09 00:14:18 UTC (rev 292661)
+++ branches/safari-613-branch/Source/_javascript_Core/ChangeLog 2022-04-09 00:14:21 UTC (rev 292662)
@@ -1,5 +1,46 @@
2022-04-07 Alan Coon <[email protected]>
+ Cherry-pick r292075. rdar://problem/88323776
+
+ 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):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@292075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-04-07 Alan Coon <[email protected]>
+
Cherry-pick r292009. rdar://problem/90918765
The lazy symbolObjectStructure should be realized before we allocate a SymbolObject.
Modified: branches/safari-613-branch/Source/_javascript_Core/debugger/Debugger.cpp (292661 => 292662)
--- branches/safari-613-branch/Source/_javascript_Core/debugger/Debugger.cpp 2022-04-09 00:14:18 UTC (rev 292661)
+++ branches/safari-613-branch/Source/_javascript_Core/debugger/Debugger.cpp 2022-04-09 00:14:21 UTC (rev 292662)
@@ -170,7 +170,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