Bug 192724 - Web Inspector: Avoid creating and evaluating in the InspectorOverlay page on iOS as it is unused
Summary: Web Inspector: Avoid creating and evaluating in the InspectorOverlay page on ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-14 16:25 PST by Joseph Pecoraro
Modified: 2018-12-14 20:30 PST (History)
7 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.72 KB, patch)
2018-12-14 16:28 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2018-12-14 16:25:35 PST
Avoid creating and evaluating in the InspectorOverlay page on iOS as it is unused

Noticed this when enabling rulers, which don't show on iOS, but I saw lots of time spent updating rulers in JavaScript profiling.
Comment 1 Radar WebKit Bug Importer 2018-12-14 16:26:34 PST
<rdar://problem/46745911>
Comment 2 Joseph Pecoraro 2018-12-14 16:28:27 PST
Created attachment 357354 [details]
[PATCH] Proposed Fix
Comment 3 Devin Rousso 2018-12-14 16:36:43 PST
Comment on attachment 357354 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=357354&action=review

rs=me, good catch!

> Source/WebCore/inspector/InspectorOverlay.cpp:183
> +    Page* overlayPage = this->overlayPage();

Is this actually reachable on iOS?  I'd expect `InspectorOverlay::paint` (which is called from `InspectorController::drawHighlight`, which is called from `WebInspectorClient::drawRect`) to not happen on iOS, since it doesn't actually involve creating a `PageOverlay`?
Comment 4 Joseph Pecoraro 2018-12-14 20:04:12 PST
(In reply to Devin Rousso from comment #3)
> Comment on attachment 357354 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=357354&action=review
> 
> rs=me, good catch!
> 
> > Source/WebCore/inspector/InspectorOverlay.cpp:183
> > +    Page* overlayPage = this->overlayPage();
> 
> Is this actually reachable on iOS?  I'd expect `InspectorOverlay::paint`
> (which is called from `InspectorController::drawHighlight`, which is called
> from `WebInspectorClient::drawRect`) to not happen on iOS, since it doesn't
> actually involve creating a `PageOverlay`?

I don't think it is but I just want this code to be safe.
Comment 5 WebKit Commit Bot 2018-12-14 20:30:48 PST
Comment on attachment 357354 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 357354

Committed r239247: <https://trac.webkit.org/changeset/239247>
Comment 6 WebKit Commit Bot 2018-12-14 20:30:50 PST
All reviewed patches have been landed.  Closing bug.