Bug 135746 - Web Inspector: add a Scripts timeline record for Promise fulfillment
Summary: Web Inspector: add a Scripts timeline record for Promise fulfillment
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-08-07 22:28 PDT by Brian Burg
Modified: 2016-07-22 20:05 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2014-08-07 22:28:46 PDT
This will require new instrumentation. It should be like Timer Fired, except more promising. It should be simple to also include whether the promise was resolved or rejected. Sometimes, it doesn't quite work the way people expect.. :)
Comment 1 Radar WebKit Bug Importer 2014-08-07 22:29:23 PDT
<rdar://problem/17956025>
Comment 2 Brian Burg 2014-08-08 23:24:17 PDT
I am not sure how we would get these callbacks through to an inspector agent. Current paths include plumbing to call into the global object's JSGlobalObjectInspectorController (i.e, to report exceptions) and through ScriptDebugServer listeners. The former seems better here, but that controller is guarded by ENABLE(REMOTE_INSPECTOR).

Any thoughts, Joe?
Comment 3 Joseph Pecoraro 2014-08-11 11:29:12 PDT
(In reply to comment #2)
> I am not sure how we would get these callbacks through to an inspector agent. Current paths include plumbing to call into the global object's JSGlobalObjectInspectorController (i.e, to report exceptions) and through ScriptDebugServer listeners. The former seems better here, but that controller is guarded by ENABLE(REMOTE_INSPECTOR).

JSGlobalObjectInspectorController is only for JSContext inspection.

I think this should go through the JSGlobalObject::debugger JSC::Debugger (ScriptDebugServer).
Comment 4 Joseph Pecoraro 2016-07-22 20:05:08 PDT
We did this with ScriptProfiler's Event records. Promise fulfillment is a Microtask event, and we have bubbles and profiling data for these evaluations.