Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: Source/modules/performance/WorkerPerformance.cpp

Issue 111743007: Add the SharedWorker.workerStart property for high resolution timers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code style compliance Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/modules/performance/WorkerPerformance.h ('k') | Source/modules/performance/WorkerPerformance.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/performance/WorkerPerformance.cpp
diff --git a/Source/modules/performance/WorkerPerformance.cpp b/Source/modules/performance/WorkerPerformance.cpp
index 67e77e1ba13c2cfa15a2b83fbf2ef0b584fe02c7..fe20882c6aa3540c37ea9e45c804140f5711bbac 100644
--- a/Source/modules/performance/WorkerPerformance.cpp
+++ b/Source/modules/performance/WorkerPerformance.cpp
@@ -37,19 +37,19 @@
namespace WebCore {
-WorkerPerformance::WorkerPerformance(ExecutionContext* context)
- : ContextLifecycleObserver(context)
+WorkerPerformance::WorkerPerformance()
{
+ ScriptWrappable::init(this);
}
WorkerPerformance::~WorkerPerformance()
{
}
-double WorkerPerformance::now() const
+double WorkerPerformance::now(ExecutionContext* context) const
{
- ExecutionContext* context = executionContext();
ASSERT(context);
+ ASSERT(context->isWorkerGlobalScope());
WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(context);
return 1000.0 * (monotonicallyIncreasingTime() - workerGlobalScope->timeOrigin());
}
« no previous file with comments | « Source/modules/performance/WorkerPerformance.h ('k') | Source/modules/performance/WorkerPerformance.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698