| Summary: | [WebXR] unsigned long in IDL should be translated as unsigned in C++ code | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sergio Villar Senin <svillar> | ||||
| Component: | New Bugs | Assignee: | Sergio Villar Senin <svillar> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | darin, dino, svillar, webkit-bug-importer, youennf, zan | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 208988 | ||||||
| Attachments: |
|
||||||
|
Description
Sergio Villar Senin
2020-06-10 04:24:34 PDT
Created attachment 401533 [details]
Patch
Comment on attachment 401533 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401533&action=review > Source/WebCore/Modules/webxr/WebXRSession.cpp:203 > + unsigned newId = ++m_nextCallbackId; This makes it clear that m_nextCallbackId is misnamed. Because we can see here that in practice it contains the last already-used callback ID, not the next callback ID to be used. > Source/WebCore/Modules/webxr/WebXRSession.h:77 > + void cancelAnimationFrame(unsigned handle); A little inelegant that the header calls this "handle", but the .cpp file calls it "callbackId". Comment on attachment 401533 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=401533&action=review Thanks for the quick review! >> Source/WebCore/Modules/webxr/WebXRSession.cpp:203 >> + unsigned newId = ++m_nextCallbackId; > > This makes it clear that m_nextCallbackId is misnamed. Because we can see here that in practice it contains the last already-used callback ID, not the next callback ID to be used. Right. I'll do the following, initialize m_nextCallbackId to 1 and the replace the ++m_nextCallbackId by m_nextCallbackId++ >> Source/WebCore/Modules/webxr/WebXRSession.h:77 >> + void cancelAnimationFrame(unsigned handle); > > A little inelegant that the header calls this "handle", but the .cpp file calls it "callbackId". ACK, I'll use a more consistent naming. Committed r263256: <https://trac.webkit.org/changeset/263256> |