File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -364,16 +364,21 @@ char* Debug::RestoreDebug(char* storage) {
364
364
MemCopy (reinterpret_cast <char *>(&thread_local_), storage,
365
365
ArchiveSpacePerThread ());
366
366
367
- // Enter the debugger.
368
- DebugScope debug_scope (this );
369
-
370
- // Clear any one-shot breakpoints that may have been set by the other
371
- // thread, and reapply breakpoints for this thread.
372
- ClearOneShot ();
367
+ if (in_debug_scope ()) {
368
+ // If this thread was in a DebugScope when we archived it, restore the
369
+ // previous debugging state now. Note that in_debug_scope() returns
370
+ // true when thread_local_.current_debug_scope_ (restored by MemCopy
371
+ // above) is non-null.
372
+
373
+ // Clear any one-shot breakpoints that may have been set by the other
374
+ // thread, and reapply breakpoints for this thread.
375
+ HandleScope scope (isolate_);
376
+ ClearOneShot ();
373
377
374
- if (thread_local_.last_step_action_ != StepNone) {
375
- // Reset the previous step action for this thread.
376
- PrepareStep (thread_local_.last_step_action_ );
378
+ if (thread_local_.last_step_action_ != StepNone) {
379
+ // Reset the previous step action for this thread.
380
+ PrepareStep (thread_local_.last_step_action_ );
381
+ }
377
382
}
378
383
379
384
return storage + ArchiveSpacePerThread ();
You can’t perform that action at this time.
0 commit comments