Changeset 224540 in webkit
- Timestamp:
- Nov 7, 2017 12:01:08 PM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r224537 r224540 1 2017-11-07 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Add some fast returns in cases where we only call through to a NetworkAgent 4 https://bugs.webkit.org/show_bug.cgi?id=179359 5 6 Reviewed by Devin Rousso. 7 8 * inspector/InspectorInstrumentation.h: 9 (WebCore::InspectorInstrumentation::willSendRequest): 10 (WebCore::InspectorInstrumentation::willSendRequestOfType): 11 (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache): 12 (WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponse): 13 (WebCore::InspectorInstrumentation::didReceiveData): 14 (WebCore::InspectorInstrumentation::didFinishXHRLoading): 15 (WebCore::InspectorInstrumentation::willLoadXHRSynchronously): 16 (WebCore::InspectorInstrumentation::didLoadXHRSynchronously): 17 (WebCore::InspectorInstrumentation::scriptImported): 18 (WebCore::InspectorInstrumentation::didReceiveScriptResponse): 19 Fast return if no frontend in cases that only call into NetworkAgent 20 because the NetworkAgent is only available if there is a frontend. 21 1 22 2017-10-31 Filip Pizlo <fpizlo@apple.com> 2 23 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.h
r224370 r224540 169 169 static void didRecalculateStyle(const InspectorInstrumentationCookie&); 170 170 static void didScheduleStyleRecalculation(Document&); 171 172 171 static void applyEmulatedMedia(Frame&, String&); 172 173 173 static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse); 174 174 static void didLoadResourceFromMemoryCache(Page&, DocumentLoader*, CachedResource*); … … 347 347 static void didRecalculateStyleImpl(const InspectorInstrumentationCookie&); 348 348 static void didScheduleStyleRecalculationImpl(InstrumentingAgents&, Document&); 349 350 349 static void applyEmulatedMediaImpl(InstrumentingAgents&, String&); 350 351 351 static void willSendRequestImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse); 352 352 static void willSendRequestOfTypeImpl(InstrumentingAgents&, unsigned long identifier, DocumentLoader*, ResourceRequest&, LoadType); … … 903 903 inline void InspectorInstrumentation::willSendRequest(Frame* frame, unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse) 904 904 { 905 FAST_RETURN_IF_NO_FRONTENDS(void()); 905 906 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame)) 906 907 willSendRequestImpl(*instrumentingAgents, identifier, loader, request, redirectResponse); … … 909 910 inline void InspectorInstrumentation::willSendRequestOfType(Frame* frame, unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, LoadType loadType) 910 911 { 912 FAST_RETURN_IF_NO_FRONTENDS(void()); 911 913 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame)) 912 914 willSendRequestOfTypeImpl(*instrumentingAgents, identifier, loader, request, loadType); … … 915 917 inline void InspectorInstrumentation::didLoadResourceFromMemoryCache(Page& page, DocumentLoader* loader, CachedResource* resource) 916 918 { 919 FAST_RETURN_IF_NO_FRONTENDS(void()); 917 920 didLoadResourceFromMemoryCacheImpl(instrumentingAgentsForPage(page), loader, resource); 918 921 } … … 926 929 inline void InspectorInstrumentation::didReceiveThreadableLoaderResponse(DocumentThreadableLoader& documentThreadableLoader, unsigned long identifier) 927 930 { 931 FAST_RETURN_IF_NO_FRONTENDS(void()); 928 932 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForDocument(documentThreadableLoader.document())) 929 933 didReceiveThreadableLoaderResponseImpl(*instrumentingAgents, documentThreadableLoader, identifier); … … 932 936 inline void InspectorInstrumentation::didReceiveData(Frame* frame, unsigned long identifier, const char* data, int dataLength, int encodedDataLength) 933 937 { 938 FAST_RETURN_IF_NO_FRONTENDS(void()); 934 939 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame)) 935 940 didReceiveDataImpl(*instrumentingAgents, identifier, data, dataLength, encodedDataLength); … … 971 976 inline void InspectorInstrumentation::didFinishXHRLoading(ScriptExecutionContext* context, unsigned long identifier, std::optional<String> decodedText) 972 977 { 978 FAST_RETURN_IF_NO_FRONTENDS(void()); 973 979 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 974 980 didFinishXHRLoadingImpl(*instrumentingAgents, identifier, decodedText); … … 977 983 inline void InspectorInstrumentation::willLoadXHRSynchronously(ScriptExecutionContext* context) 978 984 { 985 FAST_RETURN_IF_NO_FRONTENDS(void()); 979 986 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 980 987 willLoadXHRSynchronouslyImpl(*instrumentingAgents); … … 983 990 inline void InspectorInstrumentation::didLoadXHRSynchronously(ScriptExecutionContext* context) 984 991 { 992 FAST_RETURN_IF_NO_FRONTENDS(void()); 985 993 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 986 994 didLoadXHRSynchronouslyImpl(*instrumentingAgents); … … 989 997 inline void InspectorInstrumentation::scriptImported(ScriptExecutionContext& context, unsigned long identifier, const String& sourceString) 990 998 { 999 FAST_RETURN_IF_NO_FRONTENDS(void()); 991 1000 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 992 1001 scriptImportedImpl(*instrumentingAgents, identifier, sourceString); … … 1001 1010 inline void InspectorInstrumentation::didReceiveScriptResponse(ScriptExecutionContext* context, unsigned long identifier) 1002 1011 { 1012 FAST_RETURN_IF_NO_FRONTENDS(void()); 1003 1013 if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForContext(context)) 1004 1014 didReceiveScriptResponseImpl(*instrumentingAgents, identifier);
Note: See TracChangeset
for help on using the changeset viewer.