screen.orientation.unlock shouldn't throw an exception when not fullscreen?
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
People
(Reporter: m_kato, Assigned: m_kato)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Chrome doesn't throw any exception when calling screen.orientation.unlock. But Firefox will throw NS_ERROR_DOM_SECURITY_ERR by https://searchfox.org/mozilla-central/rev/fbb1e8462ad82b0e76b5c13dd0d6280cfb69e68d/dom/base/ScreenOrientation.cpp#347 when document isn't fullscreen. So this is different behavior.
Shouldn't screen.orientation.unlock throw an exception even if not fullscreen?
Updated•3 years ago
|
| Assignee | ||
Updated•3 years ago
|
| Assignee | ||
Comment 3•3 years ago
|
||
Some web platform tests of screen orientation API will be failure due to
unhandled promise rejection. Our screen.orientation.unlock() implementation
may set rejected promise since we create promise internally.
Actually, screen.orientation.unlock() doesn't return promise, so we
shouldn't end up reporting it.
Comment 4•3 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #3)
Some web platform tests of screen orientation API will be failure due to
unhandled promise rejection. Ourscreen.orientation.unlock()implementation
may set rejected promise since we create promise internally.Actually,
screen.orientation.unlock()doesn't return promise, so we
shouldn't end up reporting it.
I think we have means of marking rejected promises as handled so they don't trigger the unhandled promise rejection callback. Arai-san will know.
Comment 5•3 years ago
|
||
(In reply to Brian Birtles (:birtles) from comment #4)
I think we have means of marking rejected promises as handled so they don't trigger the unhandled promise rejection callback. Arai-san will know.
SetAnyPromiseIsHandled used in the patch is it.
Comment 6•3 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #5)
SetAnyPromiseIsHandledused in the patch is it.
Oh, my bad. I didn't even look at the patch since I was on my phone. I guess I misunderstood the comment about WPT failures.
Comment 9•3 years ago
|
||
| bugherder | ||
Comment 11•3 years ago
|
||
Agi says this feature is not enabled by default. No need to uplift to Beta 101.
Description
•