зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1576154 - Check mSVGDocumentWrapper when trying to report use counters; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D43256 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
a5f69db222
Коммит
20182dbcb2
|
@ -0,0 +1,8 @@
|
|||
function handleRequest(request, response)
|
||||
{
|
||||
response.setStatusLine("1.1", 500, "Internal Server Error");
|
||||
response.setHeader("Content-Type", "image/svg+xml", false);
|
||||
|
||||
let body = "<svg xmlns='http://www.w3.org/2000/svg' width='70' height='0'></svg>";
|
||||
response.bodyOutputStream.write(body, body.length);
|
||||
}
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 255 B |
|
@ -52,6 +52,7 @@ support-files =
|
|||
bug704320.sjs
|
||||
bug704320_counter.sjs
|
||||
bug819051.sjs
|
||||
bug1576154.sjs
|
||||
chrome/bug418986-1.js
|
||||
copypaste.js
|
||||
delayedServerEvents.sjs
|
||||
|
@ -244,6 +245,7 @@ support-files =
|
|||
!/dom/animation/test/testcommon.js
|
||||
!/dom/events/test/event_leak_utils.js
|
||||
../../../browser/extensions/pdfjs/test/file_pdfjs_test.pdf
|
||||
green.png
|
||||
|
||||
[test_anchor_area_referrer.html]
|
||||
[test_anchor_area_referrer_changing.html]
|
||||
|
@ -634,6 +636,7 @@ skip-if = os == "mac" # Different tab focus behavior on mac
|
|||
[test_bug1472427.html]
|
||||
[test_bug1499169.html]
|
||||
skip-if = toolkit == 'android' # Timeouts on android due to page closing issues with embedded pdf
|
||||
[test_bug1576154.html]
|
||||
[test_caretPositionFromPoint.html]
|
||||
[test_change_policy.html]
|
||||
[test_clearTimeoutIntervalNoArg.html]
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1576154
|
||||
-->
|
||||
<head>
|
||||
<title>Test for Bug 1576154</title>
|
||||
<script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1576154">Mozilla Bug 1576154</a>
|
||||
<p id="display"></p>
|
||||
<!-- bug1576154.sjs returns an SVG image with HTTP error code 500. -->
|
||||
<img src="bug1576154.sjs">
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
|
||||
/** Test for Bug 657191 **/
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
window.onload = function() {
|
||||
let img = document.querySelector("img");
|
||||
img.src = "green.png";
|
||||
img.onload = function() {
|
||||
// As long as this doesn't crash, this test passes.
|
||||
ok(true, "test passed");
|
||||
SimpleTest.finish();
|
||||
};
|
||||
}
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
|
@ -1283,7 +1283,8 @@ VectorImage::RequestDiscard() {
|
|||
mProgressTracker->OnDiscard();
|
||||
}
|
||||
|
||||
if (Document* doc = mSVGDocumentWrapper->GetDocument()) {
|
||||
if (Document* doc =
|
||||
mSVGDocumentWrapper ? mSVGDocumentWrapper->GetDocument() : nullptr) {
|
||||
doc->ReportUseCounters();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче