Commit a500f201 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[test] Remove %SetFlags runtime test method.

This method introduces an inherent race because it allows changing
global static flag variables from concurrently running Isolates (or
Workers). Since there are not too many use-cases left, the method in
question can be removed entirely.

R=hpayer@chromium.org

Change-Id: I9798730dd775b04f0bc83f18ed5982672e76e5d5
Reviewed-on: https://chromium-review.googlesource.com/1186731Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#55392}
parent 464dbb7e
......@@ -658,17 +658,6 @@ RUNTIME_FUNCTION(Runtime_SystemBreak) {
}
// Sets a v8 flag.
RUNTIME_FUNCTION(Runtime_SetFlags) {
SealHandleScope shs(isolate);
DCHECK_EQ(1, args.length());
CONVERT_ARG_CHECKED(String, arg, 0);
std::unique_ptr<char[]> flags =
arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get()));
return ReadOnlyRoots(isolate).undefined_value();
}
RUNTIME_FUNCTION(Runtime_SetForceSlowPath) {
SealHandleScope shs(isolate);
DCHECK_EQ(1, args.length());
......
......@@ -534,7 +534,6 @@ namespace internal {
F(RunningInSimulator, 0, 1) \
F(SerializeWasmModule, 1, 1) \
F(SetAllocationTimeout, -1 /* 2 || 3 */, 1) \
F(SetFlags, 1, 1) \
F(SetForceSlowPath, 1, 1) \
F(SetWasmCompileControls, 2, 1) \
F(SetWasmInstantiateControls, 0, 1) \
......
......@@ -4464,7 +4464,7 @@ TEST(CEntryStubOOM) {
CcTest::isolate()->SetFatalErrorHandler(OnFatalErrorExpectOOM);
v8::Local<v8::Value> result = CompileRun(
"%SetFlags('--gc-interval=1');"
"%SetAllocationTimeout(1, 1);"
"var a = [];"
"a.__proto__ = [];"
"a.unshift(1)");
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --noconcurrent-recompilation --expose-gc --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
%SetFlags("--concurrent-recompilation --block-concurrent-recompilation");
gc();
try { %UnblockConcurrentRecompilation(); } catch (e) { }
......@@ -4,7 +4,7 @@
// Flags: --allow-natives-syntax
%SetFlags("--gc-interval=1");
%SetAllocationTimeout(1, 1);
var key = "Huckleberry Finn" + "Tom Sawyer";
var o = {};
......
......@@ -26,10 +26,10 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc --nostress-incremental-marking
// Flags: --stress-compaction
var array_1 = [];
%SetFlags("--stress-compaction");
for (var a = 0; a < 10000; a++) { array_1[a * 100] = 0; }
gc();
......
......@@ -25,12 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc
// Flags: --allow-natives-syntax --expose-gc --stress-compaction
(function() {
var array_1 = [];
%SetFlags("--stress-compaction");
for (var a = 0; a < 10000; a++) { array_1[a * 100] = 0; }
gc();
......
......@@ -2,9 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
%SetFlags("--gc-interval=164 --stress-compaction");
// Flags: --allow-natives-syntax --gc-interval=164 --stress-compaction
var a = [];
for (var i = 0; i < 10000; i++) { a[i * 100] = 0; }
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