Commit 7ee77b9b authored by gsathya's avatar gsathya Committed by Commit bot

[mjsunit] Exit on hitting unreachable code instead of throwing

Errors are swallowed by promises, so just exit with stack trace.

Review-Url: https://codereview.chromium.org/2693383004
Cr-Commit-Position: refs/heads/master@{#43254}
parent 3059138b
...@@ -34,6 +34,9 @@ var defineProperty = Object.defineProperty; ...@@ -34,6 +34,9 @@ var defineProperty = Object.defineProperty;
var numberPrototype = Number.prototype; var numberPrototype = Number.prototype;
var symbolIterator = Symbol.iterator; var symbolIterator = Symbol.iterator;
function assertUnreachable() {
%AbortJS("Failure: unreachable");
}
(function() { (function() {
// Test before clearing global (fails otherwise) // Test before clearing global (fails otherwise)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment