File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,14 @@ impl Drop for Transaction<'_> {
166166 // Given that the default behavior in JavaScript is to commit the
167167 // transaction when it is dropped, we only need to perform an action
168168 // when we want to abort the transaction.
169+ //
170+ // Typically, it would make sense to explicitly commit the transaction
171+ // with `TransactionSys::do_commit` when encountering `OnTransactionDrop::Commit`.
172+ // However, for some reason, explicitly committing the transaction causes
173+ // tests in a headless Chrome browser to hang, even though they pass in
174+ // all other contexts, including a non-headless Chrome browser. So, until
175+ // this is resolved, it is best to let `OnTransactionDrop::Commit` be
176+ // handled implicitly by the JavaScript runtime.
169177 if !self . done & matches ! ( self . on_drop, OnTransactionDrop :: Abort ) {
170178 let _ = self . as_sys ( ) . abort ( ) ;
171179 }
You can’t perform that action at this time.
0 commit comments