WebKit Bugzilla
Attachment 338943 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), 2.32 KB, created by
Rick Waldron
on 2018-04-26 17:44:45 PDT
(
hide
)
Description:
$262.agent.monotonicNow()
Filename:
MIME Type:
Creator:
Rick Waldron
Created:
2018-04-26 17:44:45 PDT
Size:
2.32 KB
patch
obsolete
>From 67ba20a251bca14d2ae36c46d18e6d4ef10948b8 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/jsc.cpp | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >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(); >-- >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