Closed Bug 1656107 Opened 4 years ago Closed 4 years ago

Fix uses of Document::FindContentForSubDocument to use BrowsingContext embedderElement

Categories

(Core :: DOM: Core & HTML, task, P2)

task

Tracking

()

RESOLVED FIXED
87 Branch
Fission Milestone M6c
Tracking Status
firefox87 --- fixed

People

(Reporter: hiro, Assigned: smacleod)

References

()

Details

Attachments

(10 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
Component: General → DOM: Core & HTML

Edgar, can you please audit this? Thanks!

Flags: needinfo?(echen)

(In reply to Hsin-Yi Tsai [:hsinyi] from comment #1)

Edgar, can you please audit this? Thanks!

I will take a look after finishing M6b bugs.

Fission dependency already indirectly present via the audit meta bug.

No longer blocks: fission

FindContentForSubDocument should be removed and the caller(s) should use BrowsingContext embedderElement instead.

Assignee: nobody → smacleod
Status: NEW → ASSIGNED
Fission Milestone: --- → M6c
Flags: needinfo?(echen)
Keywords: meta
Summary: [meta] Audit uses of Document::FindContentForSubDocument → Fix uses of Document::FindContentForSubDocument to use BrowsingContext embedderElement
Priority: -- → P2

The code this comment refers to was changed/removed at some point.

Depends on D98615

Pushed by smacleod@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ec3d7e825bc9 remove FindContentForSubDocument use from NotificationController. r=farre https://hg.mozilla.org/integration/autoland/rev/469fa7a429c2 remove FindContentForSubDocument use from nsContentUtils. r=farre https://hg.mozilla.org/integration/autoland/rev/95eeff5318e5 remove FindContentForSubDocument use from nsGlobalWindowOuter. r=farre https://hg.mozilla.org/integration/autoland/rev/0f4ea8cdd34a remove obsolete comment from nsGlobalWindowOuter. r=farre https://hg.mozilla.org/integration/autoland/rev/8d98b76de39a remove FindContentForSubDocument use from EventStateManager. r=farre https://hg.mozilla.org/integration/autoland/rev/b51bae240379 remove FindContentForSubDocument use from nsPresContext. r=farre https://hg.mozilla.org/integration/autoland/rev/1e06017a213c remove FindContentForSubDocument use from nsComputedDOMStyle. r=farre https://hg.mozilla.org/integration/autoland/rev/87031ccf6c8e remove FindContentForSubDocument use from Document. r=farre https://hg.mozilla.org/integration/autoland/rev/2d9843871809 remove unused Document::FindContentForSubDocument. r=farre

Backed out 9 changesets (bug 1656107) for frequent assertion failures on layout/style/nsComputedDOMStyle.cpp.

Push with failure: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&fromchange=a421fd8b98973bcd6569ccc904523105c7282cd6&searchStr=android%2C7.0%2Cx86-64%2Cwebrender%2Cdebug%2Creftests%2Ctest-android-em-7.0-x86_64-qr%2Fdebug-geckoview-crashtest-e10s%2Cc&tochange=97bb496fd391cd8bb30f65001a637f074a35be94&selectedTaskRun=P3BVqYcbSIuU8aR_F9BMfg.0

Backout link: https://hg.mozilla.org/integration/autoland/rev/97bb496fd391cd8bb30f65001a637f074a35be94

Failure log: https://treeherder.mozilla.org/logviewer?job_id=324851110&repo=autoland&lineNumber=3237

[task 2020-12-17T19:56:01.519Z] 19:56:01     INFO -  REFTEST TEST-START | dom/base/crashtests/1681729.html
[task 2020-12-17T19:56:01.520Z] 19:56:01     INFO -  REFTEST TEST-LOAD | http://10.0.2.2:8854/tests/dom/base/crashtests/1681729.html | 360 / 3872 (9%)
[task 2020-12-17T19:56:01.525Z] 19:56:01     INFO -  REFTEST TEST-PASS | dom/base/crashtests/1681729.html | (LOAD ONLY)
[task 2020-12-17T19:56:01.525Z] 19:56:01     INFO -  REFTEST TEST-END | dom/base/crashtests/1681729.html
[task 2020-12-17T19:56:01.525Z] 19:56:01     INFO -  REFTEST WARNING | Failed to find the test-plugin.
[task 2020-12-17T19:56:01.525Z] 19:56:01     INFO -  REFTEST WARNING | Failed to find the test-plugin.
[task 2020-12-17T19:56:01.525Z] 19:56:01     INFO -  REFTEST WARNING | Failed to get test plugin tags.
[task 2020-12-17T19:56:21.704Z] 19:56:21     INFO -  wait for org.mozilla.geckoview.test complete; top activity=com.android.launcher3
[task 2020-12-17T19:56:21.731Z] 19:56:21     INFO -  remoteautomation.py | Application ran for: 0:01:56.764189
[task 2020-12-17T19:56:21.826Z] 19:56:21     INFO -  REFTEST INFO | Copy/paste: /builds/worker/fetches/minidump_stackwalk/minidump_stackwalk /tmp/tmpwrCdRu/12abbac2-45d0-3449-5cdd-fd668a808340.dmp /builds/worker/workspace/build/symbols
[task 2020-12-17T19:56:26.229Z] 19:56:26     INFO -  REFTEST INFO | Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/12abbac2-45d0-3449-5cdd-fd668a808340.dmp
[task 2020-12-17T19:56:26.229Z] 19:56:26     INFO -  REFTEST INFO | Saved app info as /builds/worker/workspace/build/blobber_upload_dir/12abbac2-45d0-3449-5cdd-fd668a808340.extra
[task 2020-12-17T19:56:26.234Z] 19:56:26  WARNING -  REFTEST PROCESS-CRASH | dom/base/crashtests/1681729.html (finished) | application crashed [@ nsComputedDOMStyle::NeedsToFlushStyle(nsCSSPropertyID) const]
[task 2020-12-17T19:56:26.234Z] 19:56:26     INFO -  Mozilla crash reason: MOZ_ASSERT(!bc->IsCached())
[task 2020-12-17T19:56:26.234Z] 19:56:26     INFO -  Crash dump filename: /tmp/tmpwrCdRu/12abbac2-45d0-3449-5cdd-fd668a808340.dmp
[task 2020-12-17T19:56:26.234Z] 19:56:26     INFO -  Operating system: Android
[task 2020-12-17T19:56:26.234Z] 19:56:26     INFO -                    0.0.0 Linux 3.10.0+ #260 SMP PREEMPT Fri May 19 12:48:14 PDT 2017 x86_64
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  CPU: amd64
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -       family 6 model 6 stepping 3
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -       4 CPUs
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  GPU: UNKNOWN
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  Crash reason:  SIGSEGV /SEGV_MAPERR
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  Crash address: 0x0
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  Process uptime: not available
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -  Thread 11 (crashed)
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -   0  libxul.so!nsComputedDOMStyle::NeedsToFlushStyle(nsCSSPropertyID) const [nsComputedDOMStyle.cpp:9ad9958576c1e74fee487a733c85419ddef59d76 : 826 + 0x29]
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -      rax = 0x0000739a330b0da0   rdx = 0x0000000000000004
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -      rcx = 0x0000739a364c8e08   rbx = 0x0000739a237f7000
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -      rsi = 0x0000739a36dca710   rdi = 0x000000000000001b
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -      rbp = 0x0000739a36dcb850   rsp = 0x0000739a36dcb830
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -       r8 = 0x000000000000ffff    r9 = 0x0000000000000000
[task 2020-12-17T19:56:26.235Z] 19:56:26     INFO -      r10 = 0x0000739a540513d0   r11 = 0x0000000000000246
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      r12 = 0x0000739a23b0d090   r13 = 0x0000739a2356ea60
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      r14 = 0x0000000000000101   r15 = 0x0000000000000001
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rip = 0x0000739a2eb9dfa1
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      Found by: given as instruction pointer in context
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -   1  libxul.so!nsComputedDOMStyle::UpdateCurrentStyleSources(nsCSSPropertyID) [nsComputedDOMStyle.cpp:9ad9958576c1e74fee487a733c85419ddef59d76 : 1002 + 0xb]
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rbp = 0x0000739a36dcb8c0   rsp = 0x0000739a36dcb860
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rip = 0x0000739a2eb9cef4
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      Found by: previous frame's frame pointer
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -   2  libxul.so!nsComputedDOMStyle::GetPropertyValue(nsCSSPropertyID, nsTSubstring<char> const&, nsTSubstring<char>&) [nsComputedDOMStyle.cpp:9ad9958576c1e74fee487a733c85419ddef59d76 : 421 + 0xa]
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rbp = 0x0000739a36dcb9d0   rsp = 0x0000739a36dcb8d0
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rip = 0x0000739a2eb9c9e8
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      Found by: previous frame's frame pointer
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -   3  libxul.so!nsDOMCSSDeclaration::GetPaddingLeft(nsTSubstring<char>&, mozilla::ErrorResult&) [ServoCSSPropList.h: : 363 + 0x17]
[task 2020-12-17T19:56:26.236Z] 19:56:26     INFO -      rbp = 0x0000739a36dcb9f0   rsp = 0x0000739a36dcb9e0
[task 2020-12-17T19:56:26.237Z] 19:56:26     INFO -      rip = 0x0000739a2d237bff
[task 2020-12-17T19:56:26.237Z] 19:56:26     INFO -      Found by: previous frame's frame pointer
...
...
...
[task 2020-12-17T19:56:27.832Z] 19:56:27     INFO -  12-17 19:55:57.703 D/GeckoViewSelectionActionDelegate[C]( 2924): handleEvent: visibilitychange
[task 2020-12-17T19:56:27.832Z] 19:56:27     INFO -  12-17 19:55:57.703 D/GeckoViewSelectionActionDelegate[C]( 2924): handleEvent: visibilitychange
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.713 I/Gecko   ( 2895):
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.713 I/Gecko   ( 2895): {"action":"log","time":1608234957713,"thread":null,"pid":null,"source":"reftest","level":"DEBUG","message":"[CONTENT] RecordResult fired"}
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895):
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895): {"action":"log","time":1608234957714,"thread":null,"pid":null,"source":"reftest","level":"DEBUG","message":"RecordResult fired"}
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895):
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895): {"action":"test_status","time":1608234957714,"thread":null,"pid":null,"source":"reftest","test":"dom/base/crashtests/1681729.html","subtest":"(LOAD ONLY)","status":"PASS"}
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895):
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895): {"action":"test_end","time":1608234957714,"thread":null,"pid":null,"source":"reftest","test":"dom/base/crashtests/1681729.html","status":"OK"}
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895):
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.714 I/Gecko   ( 2895): {"action":"log","time":1608234957714,"thread":null,"pid":null,"source":"reftest","level":"DEBUG","message":"Loading a blank page"}
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.715 E/Web Content( 2924): [JavaScript Error: "TypeError: can't access property "getComputedStyle", this.contentWindow is null" {file: "resource://reftest/ReftestFissionChild.jsm" line: 167}]
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.715 E/Web Content( 2924): receiveMessage@resource://reftest/ReftestFissionChild.jsm:167:21
[task 2020-12-17T19:56:27.833Z] 19:56:27     INFO -  12-17 19:55:57.716 F/MOZ_Assert( 2924): Assertion failure: !bc->IsCached(), at /builds/worker/checkouts/gecko/layout/style/nsComputedDOMStyle.cpp:826
[task 2020-12-17T19:56:27.834Z] 19:56:27     INFO -  12-17 19:55:57.716 F/MOZ_Assert( 2924): #01: ???[/data/app/org.mozilla.geckoview.test-1/lib/x86_64/libxul.so +0x3bd49e8]
...
Flags: needinfo?(smacleod)
Backout by csabou@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/a08abfa374b6 Backed out 9 changesets for frequent assertion failures on layout/style/nsComputedDOMStyle.cpp CLOSED TREE

There are some r+ patches which didn't land and no activity in this bug for 2 weeks.
:smacleod, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(smacleod)
Pushed by smacleod@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/678d74dedf93 Add Document::GetEmbedderElement to replace Document::FindContentForSubDocument. r=farre https://hg.mozilla.org/integration/autoland/rev/df8df0bd9884 remove FindContentForSubDocument use from NotificationController. r=farre https://hg.mozilla.org/integration/autoland/rev/e5fd5298671d remove FindContentForSubDocument use from nsContentUtils. r=farre https://hg.mozilla.org/integration/autoland/rev/1e2e392c8997 remove FindContentForSubDocument use from nsGlobalWindowOuter. r=farre https://hg.mozilla.org/integration/autoland/rev/991587b1f4b8 remove obsolete comment from nsGlobalWindowOuter. r=farre https://hg.mozilla.org/integration/autoland/rev/25a3a14285fd remove FindContentForSubDocument use from EventStateManager. r=farre https://hg.mozilla.org/integration/autoland/rev/5a00f1578a4e remove FindContentForSubDocument use from nsPresContext. r=farre https://hg.mozilla.org/integration/autoland/rev/b485b9d908ca remove FindContentForSubDocument use from nsComputedDOMStyle. r=farre https://hg.mozilla.org/integration/autoland/rev/ffdbbde6fb00 remove FindContentForSubDocument use from Document. r=farre https://hg.mozilla.org/integration/autoland/rev/b4beb2fa1266 remove unused Document::FindContentForSubDocument. r=farre
Flags: needinfo?(smacleod)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: