Bug 28847 - WebInspector: pass call frames into the frontend as a part of pausedScript event.
Summary: WebInspector: pass call frames into the frontend as a part of pausedScript ev...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-31 08:34 PDT by Pavel Feldman
Modified: 2009-08-31 10:21 PDT (History)
1 user (show)

See Also:


Attachments
patch (5.20 KB, patch)
2009-08-31 08:42 PDT, Pavel Feldman
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2009-08-31 08:34:28 PDT
Currently pausedScript event initiates asynchronous call stack request. We can save a call and pass stack information as a part of pausedScript event instead.
Comment 1 Pavel Feldman 2009-08-31 08:42:10 PDT
Created attachment 38815 [details]
patch
Comment 2 Timothy Hatcher 2009-08-31 09:28:30 PDT
Comment on attachment 38815 [details]
patch

It seems odd to me for InspectorController to call into the injected script just for it to call InspectorController.currentCallFrame() and return back to native code. IS there a more direct approch to getting the callframe script objects?
Comment 3 Pavel Feldman 2009-08-31 09:34:54 PDT
(In reply to comment #2)
> (From update of attachment 38815 [details])
> It seems odd to me for InspectorController to call into the injected script
> just for it to call InspectorController.currentCallFrame() and return back to
> native code. IS there a more direct approch to getting the callframe script
> objects?

I agree that it does look kinda weird. But the call frame serialization is rather complex and it is easier to perform it in JavaScript. It is also easier to keep frontend and injected script code in sync wrt data structures used during the serialization.

Currently I don't see any other way of handling it given that injected and frontend contexts are going to be isolated...
Comment 4 Timothy Hatcher 2009-08-31 09:38:46 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 38815 [details] [details])
> > It seems odd to me for InspectorController to call into the injected script
> > just for it to call InspectorController.currentCallFrame() and return back to
> > native code. IS there a more direct approch to getting the callframe script
> > objects?
> 
> I agree that it does look kinda weird. But the call frame serialization is
> rather complex and it is easier to perform it in JavaScript. It is also easier
> to keep frontend and injected script code in sync wrt data structures used
> during the serialization.

OK. I can go with that.

> Currently I don't see any other way of handling it given that injected and
> frontend contexts are going to be isolated...

How far are we away from doing the isolation and removing quarantine objects?
Comment 5 Pavel Feldman 2009-08-31 09:57:42 PDT
(In reply to comment #4)
> How far are we away from doing the isolation and removing quarantine objects?

1. Database panel interaction is not yet serialized.
2. I need help with establishing these isolated contexts. There was a question to Sam pending somewhere in one of the early bugs
3. I am off for vacations next week for 14 days, so this activity will either suspend or be continued by Yury.
Comment 6 Pavel Feldman 2009-08-31 10:21:43 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorFrontend.cpp
	M	WebCore/inspector/InspectorFrontend.h
	M	WebCore/inspector/front-end/DOMAgent.js
	M	WebCore/inspector/front-end/ScriptsPanel.js
	M	WebCore/inspector/front-end/inspector.js
Committed r47897