[cctest] Reenable V8 disposal
This was disabled in 2014 (https://crrev.com/267383002), together with a comment about a broken serializer. The conditional v8 initialization was since then moved back to be unconditional, but the TearDown was never restored. Now we need it for wasm, since during tear down the wasm engine synchronizes on all background compile jobs. Omitting this leads to uses of the disposed platform (see https://crrev.com/c/1429861). R=mstarzinger@chromium.org Bug: v8:8689, v8:7921, v8:8725 Change-Id: Ia24f746094f38fc6ce349532587b622384379125 Reviewed-on: https://chromium-review.googlesource.com/c/1430059 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#59032}
This commit is contained in:
parent
be11971d25
commit
b60eb45c82
@ -905,9 +905,17 @@ void RegisteredExtension::Register(RegisteredExtension* that) {
|
||||
|
||||
|
||||
void RegisteredExtension::UnregisterAll() {
|
||||
// Keep a list of all leaked Extension objects, to suppress ASan leak reports.
|
||||
// We cannot suppress via lsan suppressions, since the objects are allocated
|
||||
// at different call sites.
|
||||
// TODO(clemensh): Fix this (https://crbug.com/v8/8725).
|
||||
static std::vector<Extension*>* leaked_extensions =
|
||||
new std::vector<Extension*>;
|
||||
|
||||
RegisteredExtension* re = first_extension_;
|
||||
while (re != nullptr) {
|
||||
RegisteredExtension* next = re->next();
|
||||
leaked_extensions->push_back(re->extension_);
|
||||
delete re;
|
||||
re = next;
|
||||
}
|
||||
|
@ -337,8 +337,7 @@ int main(int argc, char* argv[]) {
|
||||
if (print_run_count && tests_run != 1)
|
||||
printf("Ran %i tests.\n", tests_run);
|
||||
CcTest::TearDown();
|
||||
// TODO(svenpanne) See comment above.
|
||||
// if (!disable_automatic_dispose_) v8::V8::Dispose();
|
||||
if (!disable_automatic_dispose_) v8::V8::Dispose();
|
||||
v8::V8::ShutdownPlatform();
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user