WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 214995
Log a warning to the dev console when gamepads are accessed from an insecure context
https://bugs.webkit.org/show_bug.cgi?id=214995
Summary
Log a warning to the dev console when gamepads are accessed from an insecure ...
Brady Eidson
Reported
2020-07-30 16:14:55 PDT
Log a warning to the dev console when gamepads are accessed from an insecure context This is to prep for the eventual restriction to secure contexts
https://github.com/w3c/gamepad/pull/120
Attachments
Patch
(3.94 KB, patch)
2020-07-31 14:00 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch
(4.02 KB, patch)
2020-07-31 14:07 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2020-07-31 14:00:09 PDT
Created
attachment 405735
[details]
Patch
Tim Horton
Comment 2
2020-07-31 14:02:10 PDT
Comment on
attachment 405735
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405735&action=review
> Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:80 > + RELEASE_ASSERT(domWindow); > + auto* document = domWindow->document(); > + RELEASE_ASSERT(document);
These seem ... aggressive? Why not just bail?
Brady Eidson
Comment 3
2020-07-31 14:03:43 PDT
(In reply to Tim Horton from
comment #2
)
> Comment on
attachment 405735
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=405735&action=review
> > > Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:80 > > + RELEASE_ASSERT(domWindow); > > + auto* document = domWindow->document(); > > + RELEASE_ASSERT(document); > > These seem ... aggressive? Why not just bail?
Yah, because the signature to return an actual array is a bummer. I'll deal with it now sub optimally.
Brady Eidson
Comment 4
2020-07-31 14:07:09 PDT
Created
attachment 405736
[details]
Patch
EWS
Comment 5
2020-07-31 15:14:10 PDT
Committed
r265160
: <
https://trac.webkit.org/changeset/265160
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 405736
[details]
.
Radar WebKit Bug Importer
Comment 6
2020-07-31 15:15:23 PDT
<
rdar://problem/66401022
>
Darin Adler
Comment 7
2020-08-02 12:28:16 PDT
Comment on
attachment 405736
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=405736&action=review
> Source/WebCore/Modules/gamepad/NavigatorGamepad.cpp:86 > + static std::once_flag onceFlag; > + std::call_once(onceFlag, [document] {
I noticed that lots of people use the thread-safe std::call_once in code that otherwise is not thread safe. I often ask them to use a boolean instead. Am I the baddie?
Aakash Jain
Comment 8
2020-08-03 13:35:41 PDT
(In reply to EWS from
comment #5
)
> Committed
r265160
: <
https://trac.webkit.org/changeset/265160
>
This introduced a broken test for windows: http/tests/misc/gamepads-insecure.html EWS also warned about this failure, tracked in
Bug 215099
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug