87aae715df
Node.js doesn't have good place to call contextDestroyed. We need to cleanup everything on our side to allow clients to not call contextDestroyed method. R=dgozman@chromium.org,eostroukhov@google.com Bug: none Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_chromium_rel_ng Change-Id: I6bfd4d6039f53eb994a2d20ecbca650744564e29 Reviewed-on: https://chromium-review.googlesource.com/575519 Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#46849}
15 lines
585 B
JavaScript
15 lines
585 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
let {session, contextGroup, Protocol} =
|
|
InspectorTest.start('Tests that contextDesrtoyed nofitication is fired when context is collected.');
|
|
|
|
(async function test() {
|
|
await Protocol.Runtime.enable();
|
|
Protocol.Runtime.onExecutionContextDestroyed(InspectorTest.logMessage);
|
|
contextGroup.addScript('inspector.freeContext()');
|
|
await Protocol.HeapProfiler.collectGarbage();
|
|
InspectorTest.completeTest();
|
|
})();
|