Bug 197348 - [WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
Summary: [WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Justin Fan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-27 17:19 PDT by Justin Fan
Modified: 2019-04-30 09:34 PDT (History)
6 users (show)

See Also:


Attachments
Patch (29.58 KB, patch)
2019-04-27 17:23 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (30.01 KB, patch)
2019-04-27 17:29 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews104 for mac-highsierra-wk2 (2.78 MB, application/zip)
2019-04-27 18:32 PDT, EWS Watchlist
no flags Details
Patch (31.01 KB, patch)
2019-04-29 13:28 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (30.50 KB, patch)
2019-04-29 13:38 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Patch (31.34 KB, patch)
2019-04-29 14:18 PDT, Justin Fan
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.90 MB, application/zip)
2019-04-29 15:31 PDT, EWS Watchlist
no flags Details
Patch (44.74 KB, patch)
2019-04-29 18:52 PDT, Justin Fan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Fan 2019-04-27 17:19:39 PDT
[WebGPU] Move 'gpu' API entry point from DOMWindow to Navigator
Comment 1 Justin Fan 2019-04-27 17:23:44 PDT
Created attachment 368417 [details]
Patch
Comment 2 Justin Fan 2019-04-27 17:29:09 PDT
Created attachment 368418 [details]
Patch
Comment 3 EWS Watchlist 2019-04-27 18:32:13 PDT
Comment on attachment 368418 [details]
Patch

Attachment 368418 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12019461

New failing tests:
fast/dom/navigator-detached-no-crash.html
Comment 4 EWS Watchlist 2019-04-27 18:32:15 PDT
Created attachment 368419 [details]
Archive of layout-test-results from ews104 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 5 Justin Fan 2019-04-29 13:28:00 PDT
Created attachment 368482 [details]
Patch
Comment 6 Justin Fan 2019-04-29 13:38:05 PDT
Created attachment 368484 [details]
Patch
Comment 7 Justin Fan 2019-04-29 14:18:54 PDT
Created attachment 368492 [details]
Patch
Comment 8 Chris Dumez 2019-04-29 14:31:07 PDT
Comment on attachment 368492 [details]
Patch

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

> Source/WebCore/ChangeLog:6
> +        Latest API provides 'gpu' through Navigator instead of DOMWindow. Replace DOMWindowWebGPU with NavigatorGPU.

Is this meant to be exposed to workers in any way?

> Source/WebCore/ChangeLog:8
> +        Reviewed by NOBODY (OOPS!).

This should be *before* the changelog description.

> Source/WebCore/Modules/webgpu/NavigatorGPU.idl:32
> +    [SameObject] readonly attribute WebGPU gpu;

Note that [SameObject] is currently a no-op AFAIK and you'll need to write custom bindings code (i.e. visitor) to ensure that the same object is always returned.
Comment 9 Justin Fan 2019-04-29 14:39:49 PDT
(In reply to Chris Dumez from comment #8)
> Comment on attachment 368492 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=368492&action=review
> 
> > Source/WebCore/ChangeLog:6
> > +        Latest API provides 'gpu' through Navigator instead of DOMWindow. Replace DOMWindowWebGPU with NavigatorGPU.
> 
> Is this meant to be exposed to workers in any way?
> 
> > Source/WebCore/ChangeLog:8
> > +        Reviewed by NOBODY (OOPS!).
> 
> This should be *before* the changelog description.
> 
> > Source/WebCore/Modules/webgpu/NavigatorGPU.idl:32
> > +    [SameObject] readonly attribute WebGPU gpu;
> 
> Note that [SameObject] is currently a no-op AFAIK and you'll need to write
> custom bindings code (i.e. visitor) to ensure that the same object is always
> returned.

Thanks for looking. Yes, there's also a partial interface for WorkerNavigator; I'll update.
Comment 10 EWS Watchlist 2019-04-29 15:31:52 PDT
Comment on attachment 368492 [details]
Patch

Attachment 368492 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12033795

New failing tests:
fast/dom/navigator-detached-no-crash.html
Comment 11 EWS Watchlist 2019-04-29 15:31:54 PDT
Created attachment 368503 [details]
Archive of layout-test-results from ews107 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews107  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 12 Justin Fan 2019-04-29 18:52:40 PDT
Created attachment 368528 [details]
Patch
Comment 13 WebKit Commit Bot 2019-04-30 09:33:41 PDT
Comment on attachment 368528 [details]
Patch

Clearing flags on attachment: 368528

Committed r244777: <https://trac.webkit.org/changeset/244777>
Comment 14 WebKit Commit Bot 2019-04-30 09:33:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 Radar WebKit Bug Importer 2019-04-30 09:34:17 PDT
<rdar://problem/50337891>