Skip to content

Commit 09055c3

Browse files
committed
fix(test): terminate SpecRunner's own PhNode on page reload
The beforeunload handler only terminated the test iframe's PhNode but not the SpecRunner's own process, leaving orphaned phnode processes after every test runner reload.
1 parent a7721af commit 09055c3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/spec/SpecRunnerUtils.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ define(function (require, exports, module) {
6767
// ignore — test window may already be torn down
6868
}
6969
}
70+
// Also terminate the SpecRunner's own PhNode process so it
71+
// doesn't become an orphan on page reload.
72+
if (window.PhNodeEngine) {
73+
try {
74+
window.PhNodeEngine.terminateNode();
75+
} catch (e) {
76+
// ignore
77+
}
78+
}
7079
});
7180

7281
function _getFileSystem() {

0 commit comments

Comments
 (0)