Bug 148487 - JSContext Inspector: Add Resources scope bar to filter anonymous/named scripts
Summary: JSContext Inspector: Add Resources scope bar to filter anonymous/named scripts
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-08-26 11:58 PDT by BJ Burg
Modified: 2016-03-03 13:50 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2015-08-26 11:58:01 PDT
There could easily be a barrage of anonymous scripts, might want to filter those out.
Comment 1 Radar WebKit Bug Importer 2015-08-26 11:58:28 PDT
<rdar://problem/22441559>
Comment 2 Nikita Vasilyev 2016-03-01 00:10:09 PST
Could you provide steps to inspect JSContext?
Comment 3 Joseph Pecoraro 2016-03-01 12:06:10 PST
(In reply to comment #2)
> Could you provide steps to inspect JSContext?

To inspect a JSContext, create an OS X Application that links JavaScriptCore.framework and creates a JSContext. Remember to add the "com.apple.security.get-task-allow" entitlement so that it can be remotely debugged by Safari.
Comment 4 Joseph Pecoraro 2016-03-01 12:08:40 PST
(In reply to comment #0)
> There could easily be a barrage of anonymous scripts, might want to filter
> those out.

I'm not sure I understand the concern. What types of anonymous scripts do you expect will show up in a JSContext?

Currently a JSContext inspector will only show named scripts. For example:
  - -[JSContext evaluateScript:withSourceURL]
  - JSEvaluateScript(...sourceURL...)
  - script with "//# sourceURL=name" directive

All other scripts won't appear by default, and I'm not sure they can be made to show.

Perhaps this bug is behaves correctly?