[Webkit-unassigned] [Bug 31293] Web Inspector: Enable 'console.profile()' and 'console.profileEnd()' regardless of JAVASCRIPT_DEBUGGER

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 11 07:39:37 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31293





--- Comment #4 from Mikhail Naganov <mnaganov at chromium.org>  2009-11-11 07:39:36 PST ---
(In reply to comment #3)
> (From update of attachment 42866 [details])
> > +#else
> > +    bool profilerEnabled() const { return enabled(); }
> >  #endif
> 
> This should likely return false, sicne there is no profiler.
> 

No. Since in this case '{start,stop}UserInitiatedProfiling' will never run.

> 
> >  #if ENABLE(JAVASCRIPT_DEBUGGER)
> >      typedef HashMap<unsigned int, RefPtr<JSC::Profile> > ProfilesMap;
> >  
> >      void startUserInitiatedProfilingSoon();
> > -    void toggleRecordButton(bool);
> >      void enableDebuggerFromFrontend(bool always);
> >      void getProfileHeaders(long callId);
> >      void getProfile(long callId, unsigned uid);
> 
> Why isn't everything profile related moved out of the if
> ENABLE(JAVASCRIPT_DEBUGGER) blocks? (Not just this file, other places too.)

I've tried to make more functions to be available, but this requires more
additional changes making patch even more complicated, because there are things
like 'toJS', 'toJSDOMWindow', which also need to be done in engine-agnostic
way.

As for the 'console.profiles' property, I'm a bit confused, because it doesn't
conform to injected script approach at all---it needs to be re-done in
'getProfiles' / 'didGetProfiles' async way, but this breaks the "standard"
interface of the 'console' object. This is a problem, actually.

So I would like not to submit this patch as is, and continue with profiling
interface generalization in small steps. Also, mind that some of these changes
will become two-sided for DevTools, so it's better to keep them simple.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list