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•2 years ago
|
Assignee | ||
Comment 3•2 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•2 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•2 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•2 years ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #5)
SetAnyPromiseIsHandled
used 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.
Pushed by m_kato@ga2.so-net.ne.jp: https://hg.mozilla.org/integration/autoland/rev/c450e1515d0f Don't throw unhandled promise rejection when screen.orientation.unlock() is called without fullscreen. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/34104 for changes under testing/web-platform/tests
Comment 9•2 years ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Comment 11•2 years ago
|
||
Agi says this feature is not enabled by default. No need to uplift to Beta 101.
Description
•