Bug 184820 - Use WindowProxy in DOMWindow.idl
Summary: Use WindowProxy in DOMWindow.idl
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-20 08:37 PDT by Chris Dumez
Modified: 2018-04-20 16:49 PDT (History)
9 users (show)

See Also:


Attachments
Patch (18.53 KB, patch)
2018-04-20 08:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (19.66 KB, patch)
2018-04-20 14:45 PDT, 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 2018-04-20 08:37:24 PDT
Use WindowProxy in DOMWindow.idl to match the specification more closely.
Comment 1 Chris Dumez 2018-04-20 08:38:35 PDT
Created attachment 338430 [details]
Patch
Comment 2 Sam Weinig 2018-04-20 10:53:27 PDT
Comment on attachment 338430 [details]
Patch

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

> Source/WebCore/page/DOMWindow.cpp:2305
> +WindowProxy* DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString)

I'm a little worried about this losing it's RefPtr'ness.  I think giving WindowProxy ref() and deref() methods, that just ref/deref the underlying AbstractFrame and making this return a RefPtr<WindowProxy> would be safer. What do you think?
Comment 3 Chris Dumez 2018-04-20 10:57:26 PDT
(In reply to Sam Weinig from comment #2)
> Comment on attachment 338430 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=338430&action=review
> 
> > Source/WebCore/page/DOMWindow.cpp:2305
> > +WindowProxy* DOMWindow::open(DOMWindow& activeWindow, DOMWindow& firstWindow, const String& urlString, const AtomicString& frameName, const String& windowFeaturesString)
> 
> I'm a little worried about this losing it's RefPtr'ness.  I think giving
> WindowProxy ref() and deref() methods, that just ref/deref the underlying
> AbstractFrame and making this return a RefPtr<WindowProxy> would be safer.
> What do you think?

Oh, I had similar concerns but did not want to have WindowProxy subclass RefCounted. Your idea sounds good.
Comment 4 Chris Dumez 2018-04-20 14:45:21 PDT
Created attachment 338463 [details]
Patch
Comment 5 WebKit Commit Bot 2018-04-20 16:48:55 PDT
Comment on attachment 338463 [details]
Patch

Clearing flags on attachment: 338463

Committed r230867: <https://trac.webkit.org/changeset/230867>
Comment 6 WebKit Commit Bot 2018-04-20 16:48:57 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-04-20 16:49:16 PDT
<rdar://problem/39613880>