File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -29,17 +29,14 @@ PyFrameObject *
29
29
_PyFrame_MakeAndSetFrameObject (_PyInterpreterFrame * frame )
30
30
{
31
31
assert (frame -> frame_obj == NULL );
32
- PyObject * error_type , * error_value , * error_traceback ;
33
- PyErr_Fetch (& error_type , & error_value , & error_traceback );
32
+ PyObject * exc = PyErr_GetRaisedException ();
34
33
35
34
PyFrameObject * f = _PyFrame_New_NoTrack (frame -> f_code );
36
35
if (f == NULL ) {
37
- Py_XDECREF (error_type );
38
- Py_XDECREF (error_value );
39
- Py_XDECREF (error_traceback );
36
+ Py_XDECREF (exc );
40
37
return NULL ;
41
38
}
42
- PyErr_Restore ( error_type , error_value , error_traceback );
39
+ PyErr_SetRaisedException ( exc );
43
40
if (frame -> frame_obj ) {
44
41
// GH-97002: How did we get into this horrible situation? Most likely,
45
42
// allocating f triggered a GC collection, which ran some code that
You can’t perform that action at this time.
0 commit comments