Summary: Type Profiler and Code Coverage Profiler should work in Workers Enable/Disable for Workers when enabling/disabling for the Page.
<rdar://problem/29234906>
Created attachment 294621 [details] [PATCH] Proposed Fix
Comment on attachment 294621 [details] [PATCH] Proposed Fix Is there a way to test this code?
Comment on attachment 294621 [details] [PATCH] Proposed Fix Clearing flags on attachment: 294621 Committed r208664: <http://trac.webkit.org/changeset/208664>
All reviewed patches have been landed. Closing bug.
I noticed RuntimeAgent.enableTypeProfiler and RuntimeAgent.enableControlFlowProfiler in WebInspector.loaded method were unchanged. Was it on purpose? this.showJavaScriptTypeInformationSetting = new WebInspector.Setting("show-javascript-type-information", false); if (this.showJavaScriptTypeInformationSetting.value && window.RuntimeAgent && RuntimeAgent.enableTypeProfiler) RuntimeAgent.enableTypeProfiler(); this.enableControlFlowProfilerSetting = new WebInspector.Setting("enable-control-flow-profiler", false); if (this.enableControlFlowProfilerSetting.value && window.RuntimeAgent && RuntimeAgent.enableControlFlowProfiler) RuntimeAgent.enableControlFlowProfiler();
(In reply to comment #6) > I noticed RuntimeAgent.enableTypeProfiler and > RuntimeAgent.enableControlFlowProfiler in WebInspector.loaded method were > unchanged. Was it on purpose? > > this.showJavaScriptTypeInformationSetting = new > WebInspector.Setting("show-javascript-type-information", false); > if (this.showJavaScriptTypeInformationSetting.value && > window.RuntimeAgent && RuntimeAgent.enableTypeProfiler) > RuntimeAgent.enableTypeProfiler(); > > this.enableControlFlowProfilerSetting = new > WebInspector.Setting("enable-control-flow-profiler", false); > if (this.enableControlFlowProfilerSetting.value && window.RuntimeAgent > && RuntimeAgent.enableControlFlowProfiler) > RuntimeAgent.enableControlFlowProfiler(); That code turns on the feature to match the initial value of the setting. The code I'm adding toggles the feature based on the setting changing. Both are necessary.
Oh I'm sorry, I commented thinking this was a different bugzilla bug. In this code no other Target will exist yet. Only the MainTarget which this is affecting. When other Targets are added, they run additional code. See WorkerTarget.
(In reply to comment #8) > Oh I'm sorry, I commented thinking this was a different bugzilla bug. > > In this code no other Target will exist yet. Only the MainTarget which this > is affecting. > > When other Targets are added, they run additional code. See WorkerTarget. I see, it makes sense.