WebKit Bugzilla
Attachment 338988 Details for
Bug 185043
: Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
$262.agent.monotonicNow()
0001-Expose-262.agent.monotonicNow-for-use-in-testing-Ato.patch (text/plain), 4.37 KB, created by
Rick Waldron
on 2018-04-27 08:02:12 PDT
(
hide
)
Description:
$262.agent.monotonicNow()
Filename:
MIME Type:
Creator:
Rick Waldron
Created:
2018-04-27 08:02:12 PDT
Size:
4.37 KB
patch
obsolete
>From 5dd4ee915866bf46be7089357075d6e967884fbb Mon Sep 17 00:00:00 2001 >From: Rick Waldron <waldron.rick@gmail.com> >Date: Thu, 26 Apr 2018 16:25:53 -0400 >Subject: [PATCH] Expose "$262.agent.monotonicNow()" for use in testing Atomic > operation timeouts. Fixes 185043 > >Backed by Monotonic::now() >--- > Source/JavaScriptCore/ChangeLog | 33 +++++++++++++++++++++++++++++++++ > Source/JavaScriptCore/jsc.cpp | 10 +++++++++- > Source/WTF/ChangeLog | 9 +++++++++ > 3 files changed, 51 insertions(+), 1 deletion(-) > >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 7582352686..fb76677456 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,36 @@ >+2018-04-27 Rick Waldron <waldron.rick@gmail.com> >+ >+ Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts >+ https://bugs.webkit.org/show_bug.cgi?id=185043 >+ >+ Reviewed by Filip Pizlo. >+ >+ * jsc.cpp: >+ (WTF::jscExit): >+ (GlobalObject::finishCreation): >+ (functionSleepSeconds): >+ (functionForceGCSlowPaths): >+ (functionRun): >+ (functionRunString): >+ (functionLoad): >+ (functionReadline): >+ (Worker::Worker): >+ (functionDollarEvalScript): >+ (functionDollarAgentStart): >+ (functionDollarAgentReceiveBroadcast): >+ (functionDollarAgentReport): >+ (functionDollarAgentBroadcast): >+ (functionDollarAgentGetReport): >+ (functionWaitForReport): >+ (functionFlashHeapAccess): >+ (functionReoptimizationRetryCount): >+ (functionTransferArrayBuffer): >+ (functionWebAssemblyMemoryMode): >+ (dumpException): >+ (runInteractive): >+ (CommandLine::parseArguments): >+ (runJSC): >+ > 2018-04-26 Dominik Infuehr <dinfuehr@igalia.com> > > [MIPS] Fix branch offsets in branchNeg32 >diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp >index 4a73e87e96..6b81f71d1c 100644 >--- a/Source/JavaScriptCore/jsc.cpp >+++ b/Source/JavaScriptCore/jsc.cpp >@@ -82,6 +82,7 @@ > #include <type_traits> > #include <wtf/CommaPrinter.h> > #include <wtf/MainThread.h> >+#include <wtf/MonotonicTime.h> > #include <wtf/NeverDestroyed.h> > #include <wtf/StringPrintStream.h> > #include <wtf/WallTime.h> >@@ -340,6 +341,7 @@ static EncodedJSValue JSC_HOST_CALL functionDollarAgentSleep(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionDollarAgentBroadcast(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionDollarAgentGetReport(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionDollarAgentLeaving(ExecState*); >+static EncodedJSValue JSC_HOST_CALL functionDollarAgentMonotonicNow(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionWaitForReport(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionHeapCapacity(ExecState*); > static EncodedJSValue JSC_HOST_CALL functionFlashHeapAccess(ExecState*); >@@ -595,7 +597,8 @@ protected: > addFunction(vm, agent, "broadcast", functionDollarAgentBroadcast, 1); > addFunction(vm, agent, "getReport", functionDollarAgentGetReport, 0); > addFunction(vm, agent, "leaving", functionDollarAgentLeaving, 0); >- >+ addFunction(vm, agent, "monotonicNow", functionDollarAgentMonotonicNow, 0); >+ > addFunction(vm, "waitForReport", functionWaitForReport, 0); > > addFunction(vm, "heapCapacity", functionHeapCapacity, 0); >@@ -1744,6 +1747,11 @@ EncodedJSValue JSC_HOST_CALL functionDollarAgentLeaving(ExecState*) > return JSValue::encode(jsUndefined()); > } > >+EncodedJSValue JSC_HOST_CALL functionDollarAgentMonotonicNow(ExecState*) >+{ >+ return JSValue::encode(jsNumber(MonotonicTime::now().secondsSinceEpoch().milliseconds())); >+} >+ > EncodedJSValue JSC_HOST_CALL functionWaitForReport(ExecState* exec) > { > VM& vm = exec->vm(); >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 1d2d20d2b0..244a7c34a4 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,12 @@ >+2018-04-27 Rick Waldron <waldron.rick@gmail.com> >+ >+ Expose "$262.agent.monotonicNow()" for use in testing Atomic operation timeouts >+ https://bugs.webkit.org/show_bug.cgi?id=185043 >+ >+ Reviewed by Filip Pizlo. >+ >+ * wtf/Platform.h: >+ > 2018-04-25 Mark Lam <mark.lam@apple.com> > > Gardening: Speculative build fix for Windows 32-bit to compensate for MSVC's lack of smarts. >-- >2.15.1 (Apple Git-101) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185043
:
338943
|
338988
|
338989
|
338991
|
339108
|
339112