Closed Bug 687216 Opened 10 years ago Closed 9 years ago

XHR in worker to bogus URI leads to Assertion failure: foundIndex != size_t(-1), at c:/dev/mozilla-central/dom/workers/Exceptions.cpp:259

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla10
Tracking Status
firefox7 --- unaffected
firefox8 + affected
firefox9 + fixed
firefox10 --- fixed

People

(Reporter: khuey, Assigned: bent.mozilla)

References

Details

(Keywords: regression, Whiteboard: [inbound][qa-])

Attachments

(1 file)

Page:

<!DOCTYPE HTML>
<html>
<body>
<script type="text/javascript">

var worker = new Worker("boom.js");
worker.postMessage("abcd");

</script>
</body>
</html>

Worker:

var xhr = new XMLHttpRequest();

onmessage = function(event) {
  xhr.open("POST", event.data);
  xhr.send(null);
}

Result (when run locally):
Assertion failure: foundIndex != size_t(-1), at c:/dev/mozilla-central/dom/worke
rs/Exceptions.cpp:259

On an opt build we print an exception to the error console that has random garbage for text.

Note that I can only reproduce this with a local testcase.
Attached patch Patch, v1Splinter Review
We need to safeguard against unknown error codes.
Assignee: nobody → bent.mozilla
Status: NEW → ASSIGNED
Attachment #572054 - Flags: review?(jonas)
Comment on attachment 572054 [details] [diff] [review]
Patch, v1

I'd love to get this into the branches before we merge, it's a tiny fix that avoids a JS_ASSERT and a (harmless) undefined memory access.
Attachment #572054 - Flags: approval-mozilla-beta?
Attachment #572054 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/6b3cde4cec7f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla10
Comment on attachment 572054 [details] [diff] [review]
Patch, v1

[triage comment]
We're wiling to take this on aurora as the risk looks low (even if the reward is low). Please land today. It's too late for beta.
Attachment #572054 - Flags: approval-mozilla-beta?
Attachment #572054 - Flags: approval-mozilla-beta-
Attachment #572054 - Flags: approval-mozilla-aurora?
Attachment #572054 - Flags: approval-mozilla-aurora+
Is there something QA can do to verify this fix?
Whiteboard: [inbound] → [inbound][qa?]
You can verify that

(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #0)
> On an opt build we print an exception to the error console that has random
> garbage for text.

does not happen.
qa- for someone who is already set up to test this bug to verify the fix.
Whiteboard: [inbound][qa?] → [inbound][qa-]
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.