Closed Bug 966132 Opened 6 years ago Closed 6 years ago

[b2g][pdfjs] gaia master fails to open any pdf with TypeError

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29
blocking-b2g 1.4+
Tracking Status
firefox28 --- wontfix
firefox29 --- fixed
b2g-v1.3 --- unaffected
b2g-v1.3T --- unaffected
b2g-v1.4 --- fixed

People

(Reporter: bkelly, Assigned: baku)

References

Details

(Keywords: regression)

Attachments

(1 file)

Trying to open a pdf with gaia rev:

  aedd5c9636f305d4433491056a0ca984dfb859b1

I get the following and the progress bar never moves:

  E/GeckoConsole( 2256): [JavaScript Error: "setting a property that has only a getter" {file: "app://pdfjs.gaiamobile.org/content/build/pdf.worker.js" line: 34495}]

This does not occur on v1.3.
So this isn't going to be a Gaia regression - we haven't changed version of pdf.js since Oct 21st. The line of code failing is:

globalScope.console = workerConsole;

My guess is that this is a DOM regression, so let's start there.

Will work on getting a regression window to help diagnose this though.
Component: Gaia → DOM
Product: Firefox OS → Core
I'm going to put money on bug 620935 being the cause, although I suspect the fix is in gaia.
Blocks: 620935
Jason, thank you for looking up the relevant code bit!

On main thread, window.console is a replaceable property.  I would say we should do that in workers as well.  Then the code in question will just work (and override the built-in console, but that's the whole point of making it replaceable).
Assignee: nobody → amarchesini
Attached patch worker.patchSplinter Review
Attachment #8368535 - Flags: review?(bzbarsky)
Comment on attachment 8368535 [details] [diff] [review]
worker.patch

>+    if (!event.data.status || event.data.last)

Why do you need that first condition?  If it tests true, won't we double-finish the test?  I think we should finish() here only if event.data.last.

r=me with that.
Attachment #8368535 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/c108d4419d9a
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
blocking-b2g: 1.4? → 1.4+
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.