Skip to content
Permalink
Browse files
Flaky JSC test: stress/shared-array-buffer-sort-while-different-threa…
…d-is-modifying.js.default

https://bugs.webkit.org/show_bug.cgi?id=221129

Reviewed by Saam Barati.

Speculative fix for JSC shell's termination handling change.

* jsc.cpp:
(CommandLine::CommandLine):
(jscmain):

Canonical link: https://commits.webkit.org/234776@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273779 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Constellation committed Mar 3, 2021
1 parent 98e9f33 commit 248ba20bd75d82f33f101471ab8b924a0a3fd892
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
@@ -1,3 +1,16 @@
2021-03-02 Yusuke Suzuki <ysuzuki@apple.com>

Flaky JSC test: stress/shared-array-buffer-sort-while-different-thread-is-modifying.js.default
https://bugs.webkit.org/show_bug.cgi?id=221129

Reviewed by Saam Barati.

Speculative fix for JSC shell's termination handling change.

* jsc.cpp:
(CommandLine::CommandLine):
(jscmain):

2021-03-02 Yusuke Suzuki <ysuzuki@apple.com>

[JSC] Remove ImpureProxyType
@@ -413,9 +413,7 @@ class CommandLine {
}

enum CommandLineForWorkersTag { CommandLineForWorkers };
CommandLine(CommandLineForWorkersTag)
{
}
explicit CommandLine(CommandLineForWorkersTag);

Vector<Script> m_scripts;
Vector<String> m_arguments;
@@ -436,6 +434,7 @@ class CommandLine {

void parseArguments(int, char**);
};
static LazyNeverDestroyed<CommandLine> mainCommandLine;

static const char interactivePrompt[] = ">>> ";

@@ -3381,6 +3380,11 @@ void CommandLine::parseArguments(int argc, char** argv)
jscExit(EXIT_SUCCESS);
}

CommandLine::CommandLine(CommandLineForWorkersTag)
: m_treatWatchdogExceptionAsSuccess(mainCommandLine->m_treatWatchdogExceptionAsSuccess)
{
}

template<typename Func>
int runJSC(const CommandLine& options, bool isWorker, const Func& func)
{
@@ -3502,12 +3506,12 @@ int jscmain(int argc, char** argv)

// Note that the options parsing can affect VM creation, and thus
// comes first.
CommandLine options(argc, argv);
mainCommandLine.construct(argc, argv);

{
Options::AllowUnfinalizedAccessScope scope;
processConfigFile(Options::configFile(), "jsc");
if (options.m_dump)
if (mainCommandLine->m_dump)
Options::dumpGeneratedBytecodes() = true;
}

@@ -3574,18 +3578,18 @@ int jscmain(int argc, char** argv)
#endif

int result = runJSC(
options, false,
mainCommandLine.get(), false,
[&] (VM& vm, GlobalObject* globalObject, bool& success) {
UNUSED_PARAM(vm);
#if PLATFORM(COCOA)
vm.setOnEachMicrotaskTick(WTFMove(onEachMicrotaskTick));
#endif
runWithOptions(globalObject, options, success);
runWithOptions(globalObject, mainCommandLine.get(), success);
});

printSuperSamplerState();

if (options.m_dumpMemoryFootprint) {
if (mainCommandLine->m_dumpMemoryFootprint) {
MemoryFootprint footprint = MemoryFootprint::now();

printf("Memory Footprint:\n Current Footprint: %" PRIu64 "\n Peak Footprint: %" PRIu64 "\n", footprint.current, footprint.peak);

0 comments on commit 248ba20

Please sign in to comment.