Closed Bug 1359486 Opened 7 years ago Closed 7 years ago

Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome

Categories

(DevTools :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

In SVGImageContext::MaybeStoreContextPaint we use nsPresContext::IsChrome() to check whether we enable context paint. Unfortunately this returns false when making the check while loading the select-arrow.svg file from the select-arrow.svg patch in bug 1359273. It seems that nsContentUtils::IsChromeDoc returns the correct thing though, so we can get things working by switching to that.
Attached patch patchSplinter Review
Assignee: nobody → jwatt
Attachment #8861503 - Flags: review?(dholbert)
Comment on attachment 8861503 [details] [diff] [review]
patch

Review of attachment 8861503 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8861503 - Flags: review?(dholbert) → review+
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/85d3d629fa4a
Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
Backed out for crashing in 480345-1.html:

https://hg.mozilla.org/integration/mozilla-inbound/rev/60d376796d03405fca41b2971e6bf6c05e029c2d

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&revision=85d3d629fa4a046a41a61de6012d9c880de1a594&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=94118886&repo=mozilla-inbound

REFTEST ERROR | file:///home/worker/workspace/build/tests/reftest/tests/layout/generic/crashtests/480345-1.html | application timed out after 330 seconds with no output
REFTEST ERROR | Force-terminating active process(es).
TEST-UNEXPECTED-FAIL | file:///home/worker/workspace/build/tests/reftest/tests/layout/generic/crashtests/480345-1.html | application terminated with exit code 6
REFTEST PROCESS-CRASH | file:///home/worker/workspace/build/tests/reftest/tests/layout/generic/crashtests/480345-1.html | application crashed [@ libc-2.23.so + 0xfab5d]
REFTEST PROCESS-CRASH | file:///home/worker/workspace/build/tests/reftest/tests/layout/generic/crashtests/480345-1.html | application crashed [@ RefPtr<mozilla::dom::NodeInfo>::operator->]

The stack for the latter one starts with:

[task 2017-04-25T17:28:22.451279Z] 17:28:22     INFO - REFTEST PROCESS-CRASH | file:///home/worker/workspace/build/tests/reftest/tests/layout/generic/crashtests/480345-1.html | application crashed [@ RefPtr<mozilla::dom::NodeInfo>::operator->]
[task 2017-04-25T17:28:22.452766Z] 17:28:22     INFO - Crash dump filename: /tmp/tmpyD3uoa.mozrunner/minidumps/02c8ce11-2890-d057-d60f-fa10e58a0913.dmp
[task 2017-04-25T17:28:22.453814Z] 17:28:22     INFO - Operating system: Linux
[task 2017-04-25T17:28:22.454924Z] 17:28:22     INFO -                   0.0.0 Linux 3.13.0-112-generic #159-Ubuntu SMP Fri Mar 3 15:26:07 UTC 2017 x86_64
[task 2017-04-25T17:28:22.456026Z] 17:28:22     INFO - CPU: amd64
[task 2017-04-25T17:28:22.457083Z] 17:28:22     INFO -      family 6 model 62 stepping 4
[task 2017-04-25T17:28:22.458026Z] 17:28:22     INFO -      2 CPUs
[task 2017-04-25T17:28:22.458958Z] 17:28:22     INFO - 
[task 2017-04-25T17:28:22.460092Z] 17:28:22     INFO - GPU: UNKNOWN
[task 2017-04-25T17:28:22.461325Z] 17:28:22     INFO - 
[task 2017-04-25T17:28:22.463448Z] 17:28:22     INFO - Crash reason:  SIGSEGV
[task 2017-04-25T17:28:22.464848Z] 17:28:22     INFO - Crash address: 0x20
[task 2017-04-25T17:28:22.467024Z] 17:28:22     INFO - Process uptime: not available
[task 2017-04-25T17:28:22.468695Z] 17:28:22     INFO - 
[task 2017-04-25T17:28:22.470141Z] 17:28:22     INFO - Thread 0 (crashed)
[task 2017-04-25T17:28:22.472205Z] 17:28:22     INFO -  0  libxul.so!RefPtr<mozilla::dom::NodeInfo>::operator-> [RefPtr.h:85d3d629fa4a : 314 + 0x0]
[task 2017-04-25T17:28:22.474513Z] 17:28:22     INFO -     rax = 0x0000000000000000   rdx = 0x00007fa5e559a240
[task 2017-04-25T17:28:22.476008Z] 17:28:22     INFO -     rcx = 0x0000000000001a94   rbx = 0x00007fa5e559a240
[task 2017-04-25T17:28:22.477501Z] 17:28:22     INFO -     rsi = 0x00007fa60679a140   rdi = 0x0000000000000020
[task 2017-04-25T17:28:22.479682Z] 17:28:22     INFO -     rbp = 0x00007ffddb3270f0   rsp = 0x00007ffddb3270a8
[task 2017-04-25T17:28:22.481129Z] 17:28:22     INFO -      r8 = 0x00007ffddb327170    r9 = 0x00007ffddb327600
[task 2017-04-25T17:28:22.482884Z] 17:28:22     INFO -     r10 = 0x0000000000000000   r11 = 0x00007fa5e55a1840
[task 2017-04-25T17:28:22.484378Z] 17:28:22     INFO -     r12 = 0x00007ffddb327170   r13 = 0x00007fa60679a140
[task 2017-04-25T17:28:22.485866Z] 17:28:22     INFO -     r14 = 0x00000000db327600   r15 = 0x00000000e65b1c01
[task 2017-04-25T17:28:22.487521Z] 17:28:22     INFO -     rip = 0x00007fa621db4810
[task 2017-04-25T17:28:22.488966Z] 17:28:22     INFO -     Found by: given as instruction pointer in context
[task 2017-04-25T17:28:22.491106Z] 17:28:22     INFO -  1  libxul.so!mozilla::SVGImageContext::MaybeStoreContextPaint [nsINode.h:85d3d629fa4a : 534 + 0xd]
[task 2017-04-25T17:28:22.492738Z] 17:28:22     INFO -     rbx = 0x00007fa5e559a240   rbp = 0x00007ffddb3270f0
[task 2017-04-25T17:28:22.494173Z] 17:28:22     INFO -     rsp = 0x00007ffddb3270b0   r12 = 0x00007ffddb327170
[task 2017-04-25T17:28:22.495726Z] 17:28:22     INFO -     r13 = 0x00007fa60679a140   r14 = 0x00000000db327600
[task 2017-04-25T17:28:22.497220Z] 17:28:22     INFO -     r15 = 0x00000000e65b1c01   rip = 0x00007fa623384ce3
[task 2017-04-25T17:28:22.499270Z] 17:28:22     INFO -     Found by: call frame info
[task 2017-04-25T17:28:22.500941Z] 17:28:22     INFO -  2  libxul.so!nsLayoutUtils::DrawBackgroundImage [nsLayoutUtils.cpp:85d3d629fa4a : 6807 + 0x21]
[task 2017-04-25T17:28:22.502206Z] 17:28:22     INFO -     rbx = 0x00007ffddb3276d8   rbp = 0x00007ffddb3271c0
[task 2017-04-25T17:28:22.503754Z] 17:28:22     INFO -     rsp = 0x00007ffddb327100   r12 = 0x00007ffddb3276e8
[task 2017-04-25T17:28:22.505228Z] 17:28:22     INFO -     r13 = 0x00007ffddb327158   r14 = 0x00000000db327600
[task 2017-04-25T17:28:22.507293Z] 17:28:22     INFO -     r15 = 0x00000000e65b1c01   rip = 0x00007fa623240b72
[task 2017-04-25T17:28:22.508685Z] 17:28:22     INFO -     Found by: call frame info
Flags: needinfo?(jwatt)
Sorry about that. It seems the frame's mContent member is null. I wasn't even aware that was allowed (I'm pretty sure it never is in SVG).

I've pushed another patch with a different way to get the document (from the presContext) to Try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ccfcb91b0d6924c7de04672151a840a0367ddf8
Flags: needinfo?(jwatt)
Pushed by jwatt@jwatt.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/51fbbe092ecb
Fix SVGImageContext::MaybeStoreContextPaint to work with DevTools chrome. r=dholbert
https://hg.mozilla.org/mozilla-central/rev/51fbbe092ecb
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
See Also: → 1359762
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: