DescriptionIssue #3593 - Stop sharing a single isolate amongst all unit tests
Change `CreateJsEngine()` in "BaseJsTest" to let `JsEngine::New()` allocate
the isolate. Remove its local static variable to hold a shared isolate.
Added checks in `TearDown()` for all unit tests to verify that the use count
of `jsEngine` is zero. This entailed adding `TearDown()` routines if needed.
Reworked memory allocation in unit tests to explicitly reset shared pointers
in the `TearDown()` routines. Something about Google Test requires this to
release memory when the test ends. This item required a rewrite in classes
`PrefsTest` and `UpdateCheckTest`. Replace explicit `new` with `make_shared()`
in a number of places.
Rework `PrefsTest::Reset()` to create `JsValue` objects, rather than having
the unit tests do it. The old method was incorrect without a shared isolate,
because `JsValue` preferences were being created under the old isolate and
then could not be used in the new isolate.
Patch Set 1 : #
MessagesTotal messages: 1
|