1// Copyright 2020 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This mocks out the WebAssembly object with a permissive dummy.
6
7(function() {
8  const handler = {
9    get: function(x, prop) {
10      if (prop == Symbol.toPrimitive) {
11        return function() { return undefined; };
12      }
13      return dummy;
14    },
15  };
16  const dummy = new Proxy(function() { return dummy; }, handler);
17  WebAssembly = dummy;
18})();
19