v8/test/mjsunit/regress/regress-4279.js
binji d42e81d587 d8 workers: fix race on quit() with context_mutex_
When quit() is called, d8 shell exits without cleanup. If a worker is running,
it might be holding the context_mutex_, which if destroyed will DCHECK.

BUG=4279
R=jarin@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/1231473002

Cr-Commit-Position: refs/heads/master@{#29557}
2015-07-09 19:30:29 +00:00

12 lines
277 B
JavaScript

// Copyright 2015 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.
if (this.Worker && this.quit) {
try {
new Function(new Worker("55"));
} catch(err) {}
quit();
}