[Webkit-unassigned] [Bug 28269] Inspector: Improve Cookie DataGrid to Show Hidden Data
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 18 10:53:18 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28269
--- Comment #21 from Joseph Pecoraro <joepeck02 at gmail.com> 2009-08-18 10:53:16 PDT ---
> Well, you need to pass the result within some callback to make the call
> asynchronous.
Okay, so the advantage is to make this async. I wasn't too worried about that,
but its probably better to do that now rather then later.
> If you don't want to store your state / data in between the call
> and response, look at DOMAgent.js. Here is a snippet you might be interested
> in:
>
> WebInspector.Cookies.prototype = {
> doAsyncWork: function() {
> function mycallback(results, are, here) {
> // process the result here
> }
> var callId = WebInspector.Callback.wrap(mycallback);
> InspectorController.getCookies(callId, parameters, go, here);
> }
> }
> WebInspector.didGetCookies = WebInspector.Callback.processCallback;
>
> Then you add 'didGetCookies' into InspectorFrontend and call it from backend
> with the same callId you are getting.
Okay, the way that I see this right now, I'll have something like:
InspectorBackend.getCookies(callId) // Starting point in IDL
-> InspectorController.getCookies(callid) // To get the Document for
cookiesUrl
-> InspectorDOMAgent.getCookies(callid, doc) // Deal with the CookieJar
-> InspectorFrontEnd.didGetCookies(callid, data) // Data to send the
callback
-> WebInspector.didGetCookies(callid, data) // Run the JS callback
function
It seems like that callstack is a bit over the top but it keeps consistent with
current conventions. Does this look okay?
I'll also need to turn a Vector<Cookie> into a ScriptObject. There are a number
of "buildArray..." in InspectorDOMAgent that I could emulate to build an array
of cookie objects. Its actually much easier to work with ScriptObject and
ScriptArray then the Custom implementations, I wish I had gone this route
before.
Thanks for the guidance so far Pavel, I really appreciate it.
--
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