diff --git a/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch b/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch index bafd0b0..949cb2d 100644 --- a/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch +++ b/patches/v8/make_createdynamicfunction_throw_if_disallowed.patch @@ -25,42 +25,3 @@ index f75014d034626643ae83dc8f167a473b7291522c..b5c2e8b25f10f2fff9011a0a1bd1aeef } // Build the source string. -diff --git a/test/mjsunit/mjsunit.status b/test/mjsunit/mjsunit.status -index 134a49f7480c87acbb08133a2d6a4d028bbdd090..7dcaa412199770d7c4f688d7f8a66d887130bf82 100644 ---- a/test/mjsunit/mjsunit.status -+++ b/test/mjsunit/mjsunit.status -@@ -232,6 +232,9 @@ - # BUG(v8:6306). - 'wasm/huge-memory': [SKIP], - -+ # Needs to be adapted after changes to Function constructor. chromium:1065094 -+ 'cross-realm-filtering': [SKIP], -+ - # Allocates a huge string and then flattens it, very slow in debug mode. - 'regress/regress-752764': [PASS, ['mode == debug', SLOW]], - -diff --git a/test/mjsunit/regress-1065094.js b/test/mjsunit/regress-1065094.js -new file mode 100644 -index 0000000000000000000000000000000000000000..365e20285bb0505dec3f84c4df57db0525e7acc3 ---- /dev/null -+++ b/test/mjsunit/regress-1065094.js -@@ -0,0 +1,19 @@ -+// Copyright 2020 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. -+ -+// Flags: --allow-natives-syntax -+ -+function f(fnConstructor) { -+ return Object.is(new fnConstructor(), undefined); -+} -+ -+const realmIndex = Realm.createAllowCrossRealmAccess(); -+const otherFunction = Realm.global(realmIndex).Function; -+Realm.detachGlobal(realmIndex); -+ -+%PrepareFunctionForOptimization(f); -+assertFalse(f(Function)); -+assertThrows(_ => f(otherFunction)); -+%OptimizeFunctionOnNextCall(f); -+assertThrows(_ => f(otherFunction));