[Webkit-unassigned] [Bug 95649] Web Inspector: CodeGeneratorInspector.py: support asynchronous command implementation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 4 11:11:13 PDT 2012


--- Comment #10 from Peter Rybin <prybin at chromium.org>  2012-09-04 11:11:24 PST ---
> Please fix the failing tests and attach an example diff of the generated code.

Done and done.

> > Source/WebCore/inspector/CodeGeneratorInspector.py:1871
> > +        void sendFailure(ErrorString);
> const ErrorString&

> > Source/WebCore/inspector/CodeGeneratorInspector.py:1874
> > +        virtual ~CallbackBase();
> style: destructor should go right after the constructor

> > Source/WebCore/inspector/CodeGeneratorInspector.py:1876
> > +        void sendIfActive(PassRefPtr<InspectorObject> partialMessage, ErrorString invocationError);
> const ErrorString& also partialMessage can be just InspectorObject*
Done. As to pointer, the farther API requires RefPtr style, thus making it RefPtr here.

> > Source/WebCore/inspector/CodeGeneratorInspector.py:1953
> > +    void sendResponse(long callId, PassRefPtr<InspectorObject> result, ErrorString invocationError);
> |result| type should be InspectorObject* instead of PassRefPtr<InspectorObject>.
The farther API requires RefPtr style, thus making it RefPtr here.

> > Source/WebCore/inspector/CodeGeneratorInspector.py:2203
> > +    sendIfActive(PassRefPtr<InspectorObject>(), error);
> sendIfActive(0, error)

> > Source/WebCore/inspector/CodeGeneratorInspector.py:2208
> > +    return !m_alreadySent && m_backendImpl->isActive();
> In theory we may end up sending response for a long-running command to a different frontend. Consider the following sequence: FE1 attaches and sends request1, then FE1 is detached and FE2 is attached, now reponse for the request1 is sent.

I believe the instance of InspectorBackendDispatcher (AKA backendImpl) is never reused in the next sessions. After FE1 is detached, isActive returns false, so the late response will be ignored and dropped and FE2 will never see it.

> > Source/WebCore/inspector/CodeGeneratorInspector.py:2903
> > +                                       None, decl_parameter_list,
> style nit: the line should be aligned by ( above.

> > Source/WebCore/inspector/CodeGeneratorInspector.py:2949
> nit: weir alignment

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