Bug 135746

Summary: Web Inspector: add a Scripts timeline record for Promise fulfillment
Product: WebKit Reporter: Brian Burg <burg>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, graouts, joepeck, sam, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

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.