I think we need to wait before we can do this. We currently have Resource + Navigation Timing on Performance but not on WorkerPerformance, and since the plan is to eventually deprecate them we don't want to expose them on Workers.
+panicker, igrigorik to comment on #4/5.
Do we have a clear path to deprecation for these APIs?
From https://chromium.googlesource.com/chromium/src/+/master/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
"Exposed can also be specified with a method, attribute and constant."
I'm not sure what happens if you specify Exposed on the interface and an attribute, but it's possible you could merge the two files, and give PerformanceTiming & PerformanceNavigation overrides to only be exposed on Window.
I tried this again and found 2 problems:
* |readonly attribute MemoryInfo memory| is exposed in Window but under RuntimeEnabled=MemoryInfoInWorkers (experimental) in Worker. Not sure how to say "this is exposed for window, and exposed for worker if MemoryInfoInWorkers is enabled".
* Currently WorkerPerformance is a member of WorkerGlobalScope (not of Worker), so exposing Performance.idl to Worker causes webexposed tests for shared and dedicated workers to fail.
#8, what do the new failed webexposed tests look like? If it's just exposing some interfaces, that sounds right.
As for the RuntimeEnabled=MemoryInfoInWorkers problem, yeah, I don't think that's fixable without changing the bindings generator. What's the timeline on launching MemoryInfoInWorkers?
We don't have a concrete timeline.
From my perspective, ideally, we come up with a more standardizable approach, and never ship MemoryInfoInWorkers.
It's unclear if or when this will happen though.
Yea IIRC the failing webexposed tests were just about exposing interfaces. If we plan to keep MemoryInfo for Performance in Windows but never expose it for Performance in Workers, then this is WontFix in the sense they can't be fully merged.
Per chat with tdresser, maybe we can remove the option of exposing MemoryInfo in Worker (and remove the MemoryInfoInWorkers flag), and then just have an attribute that is only exposed to Window (I think that should work?).
Comment 1 by foolip@chromium.org
, Apr 3 2017