Closed Bug 1583094 Opened 5 years ago Closed 5 years ago

JS access to history is broken in fission

Categories

(Core :: DOM: Core & HTML, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
Fission Milestone M4.1

People

(Reporter: pbone, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

https://searchfox.org/mozilla-central/source/js/xpconnect/tests/mochitest/test_bug940783.html is failing with fission:

$ ./mach mochitest --enable-fission js/xpconnect/tests/mochitest/test_bug940783.html

FAIL Should have thrown: (function() { hist.state; })
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:46:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:18:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1
FAIL Threw correctly: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_bug940783.html :: checkHistoryThrows/< :: line 19" data: no]
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:47:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:19:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1
FAIL Threw correctly: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_bug940783.html :: checkHistoryThrows/< :: line 20" data: no]
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:47:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:20:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1
FAIL Threw correctly: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_bug940783.html :: checkHistoryThrows/< :: line 21" data: no]
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:47:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:21:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1
FAIL Threw correctly: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_bug940783.html :: checkHistoryThrows/< :: line 22" data: no]
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:47:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:22:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1
FAIL Threw correctly: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: http://mochi.test:8888/tests/js/xpconnect/tests/mochitest/test_bug940783.html :: checkHistoryThrows/< :: line 23" data: no]
SimpleTest.ok@SimpleTest/SimpleTest.js:277:18
checkThrows@js/xpconnect/tests/mochitest/test_bug940783.html:47:19
checkHistoryThrows@js/xpconnect/tests/mochitest/test_bug940783.html:23:16
load@js/xpconnect/tests/mochitest/test_bug940783.html:39:25
onload@js/xpconnect/tests/mochitest/test_bug940783.html:1:1

I think that the condition here:
https://searchfox.org/mozilla-central/source/dom/base/nsHistory.cpp#55 and similar are failing with they should succeed. Likely because of the code in https://searchfox.org/mozilla-central/source/dom/base/nsPIDOMWindowInlines.h#55 which traverses to the outer window and back to the inner window.

Nika says that session history will be re-written in the future. There's no real point fixing this now.

Assignee: pbone → nobody
Status: ASSIGNED → NEW
Depends on: fission-history
Priority: -- → P3
Fission Milestone: M4 → M5

Blocks enabling Fission in Nightly (M6) unless this is a security issue. Peter says he'll check.

Fission Milestone: M5 → M6
Flags: needinfo?(peterv)

This test passes for me now with fission enabled?

Flags: needinfo?(peterv)

Yes, this test isn't skipped for Fission.

Status: NEW → RESOLVED
Fission Milestone: M6 → M4.1
Closed: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.