Bug 179322

Summary: ScriptExecutionContext::serviceWorkerContainer() should avoid constructing a Navigator object
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, buildbot, commit-queue, dbates, esprehn+autocc, ggaren, kangil.han, sam, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=179302
Attachments:
Description Flags
Patch
none
Patch none

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>