v8/test/mjsunit/regress/regress-crbug-1022695.js
Dan Elphick 3f254fd2fa [builtins] Put all JS linkage builtins in CODE_SPACE
Since WASM can generate direct calls to any function that it knows the
arity of and these can be any JS linkage builtin, we need to ensure that
CPP builtins also go into CODE_SPACE.

This moves 276 builtins (~25KiB) from RO_SPACE back to CODE_SPACE.

Bug: chromium:1022695, v8:7464
Change-Id: I4cda8b68ddf6a5ddad09c6e7d4e6a08c8e6c2ccb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1916600
Commit-Queue: Dan Elphick <delphick@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65004}
2019-11-18 11:09:32 +00:00

15 lines
362 B
JavaScript

// Copyright 2019 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.
assertThrows(() => {
(function (foo, foreign) {
'use asm';
var f = foreign.toString;
function get() {
f();
}
return get;
})(this, new Error())();
});