Closed Bug 1495790 Opened Last year Closed Last year

[wpt-sync] Sync PR 13316 - sensors: Ensure a document without an associated frame does not crash

Categories

(Testing :: web-platform-tests, enhancement, P4)

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 13316 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/13316
Details from upstream follow.

Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> wrote:
>  sensors: Ensure a document without an associated frame does not crash
>  
>  Commit d1034e1e6 ("sensors: Make SensorProviderProxy supplement Document,
>  not LocalFrame") tied a sensor's lifetime to a document rather than a frame,
>  but we continued to assume Document::GetFrame() would never return null.
>  
>  This is not true, as evidenced by the crash reports in bug 889754, caused by
>  SensorProxy::ShouldSuspendUpdates() trying to invoke methods on a LocalFrame
>  that can actually be a nullptr.
>  
>  The original backtrace in the bug report seems to come from sensor creation,
>  but it is easier to trigger the same crash with a focus change after
>  destroying a sensor's document's frame.
>  
>  Bug: 861675, 889754
>  Change-Id: Idb9ed5c18a655e113e2fb76cde6615aeefcc544a
>  Reviewed-on: https://chromium-review.googlesource.com/1256826
>  WPT-Export-Revision: e776994295b2291da7e8be575586db0cd5e5e0d6
Ran 8 tests and 33 subtests
OK     : 8
FAIL   : 33

New tests that have failures or other problems:
/accelerometer/Accelerometer-iframe-access.https.html
    Accelerometer: losing a document's frame with an active sensor does not crash: FAIL
    GravitySensor: losing a document's frame with an active sensor does not crash: FAIL
    LinearAccelerationSensor: losing a document's frame with an active sensor does not crash: FAIL
/ambient-light/AmbientLightSensor-iframe-access.https.html
    AmbientLightSensor: losing a document's frame with an active sensor does not crash: FAIL
/geolocation-sensor/GeolocationSensor-iframe-access.https.html
    GeolocationSensor: losing a document's frame with an active sensor does not crash: FAIL
/gyroscope/Gyroscope-iframe-access.https.html
    Gyroscope: losing a document's frame with an active sensor does not crash: FAIL
/magnetometer/Magnetometer-iframe-access.https.html
    Magnetometer: losing a document's frame with an active sensor does not crash: FAIL
    UncalibratedMagnetometer: losing a document's frame with an active sensor does not crash: FAIL
/orientation-sensor/AbsoluteOrientationSensor-iframe-access.https.html
    AbsoluteOrientationSensor: losing a document's frame with an active sensor does not crash: FAIL
/orientation-sensor/RelativeOrientationSensor-iframe-access.https.html
    RelativeOrientationSensor: losing a document's frame with an active sensor does not crash: FAIL
/proximity/ProximitySensor-iframe-access.https.html
    ProximitySensor: losing a document's frame with an active sensor does not crash: FAIL
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6da27d08b97b
[wpt PR 13316] - sensors: Ensure a document without an associated frame does not crash, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/578584d3e8e5
[wpt PR 13316] - Update wpt metadata, a=testonly
https://hg.mozilla.org/mozilla-central/rev/6da27d08b97b
https://hg.mozilla.org/mozilla-central/rev/578584d3e8e5
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.