Bug 179322 - ScriptExecutionContext::serviceWorkerContainer() should avoid constructing a Navigator object
Summary: ScriptExecutionContext::serviceWorkerContainer() should avoid constructing a ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-06 09:06 PST by Chris Dumez
Modified: 2017-11-15 12:11 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.25 KB, patch)
2017-11-06 09:07 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.25 KB, patch)
2017-11-06 09:13 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-11-06 09:06:52 PST
ScriptExecutionContext::serviceWorkerContainer() should avoid constructing a Navigator object unnecessarily.
Comment 1 Chris Dumez 2017-11-06 09:07:53 PST
Created attachment 326124 [details]
Patch
Comment 2 Chris Dumez 2017-11-06 09:13:29 PST
Created attachment 326125 [details]
Patch
Comment 3 Sam Weinig 2017-11-06 11:25:38 PST
Comment on attachment 326125 [details]
Patch

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

> Source/WebCore/page/DOMWindow.h:140
>      Navigator* navigator() const;
> +    Navigator* optionalNavigator() const { return m_navigator.get(); }

Should/can navigator() return something non-null?
Comment 4 Sam Weinig 2017-11-06 11:27:04 PST
(In reply to Sam Weinig from comment #3)
> Comment on attachment 326125 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=326125&action=review
> 
> > Source/WebCore/page/DOMWindow.h:140
> >      Navigator* navigator() const;
> > +    Navigator* optionalNavigator() const { return m_navigator.get(); }
> 
> Should/can navigator() return something non-null?

Nevermind, I remember it can't due to no-frame cases.
Comment 5 WebKit Commit Bot 2017-11-06 11:46:38 PST
Comment on attachment 326125 [details]
Patch

Clearing flags on attachment: 326125

Committed r224502: <https://trac.webkit.org/changeset/224502>
Comment 6 WebKit Commit Bot 2017-11-06 11:46:40 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2017-11-15 12:11:00 PST
<rdar://problem/35567095>