Closed Bug 784205 Opened 12 years ago Closed 12 years ago

On-device screenshots don't work (Failure arg 0 [nsIDOMDeviceStorage.addNamed]")

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cjones, Assigned: djf)

Details

Attachments

(1 file, 1 obsolete file)

STR
 (1) Press HOME+power to take screenshot

I get the vibration feedback, but the screenshot doesn't appear in my /sdcard/DCIM.  This error looks relevant

I/GeckoDump(  106): XXX FIXME : Got a mozContentEvent: take-screenshot
E/GeckoConsole(  106): Content JS LOG at app://system.thisdomaindoesnotexist.org/js/screenshot.js:72 in ss_onMozChromeEvent: exception in screenshot handler [Exception... "Failure arg 0 [nsIDOMDeviceStorage.addNamed]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: app://system.thisdomaindoesnotexist.org/js/screenshot.js :: ss_onMozChromeEvent :: line 49"  data: no]
blocking-basecamp: --- → ?
blocking-basecamp: ? → ---
Attached patch patch (obsolete) — Splinter Review
The problem was that sendChromeEvent in shell.js had been converted to use ObjectWrapper.wrap() on the detail object.  But that function can't correctly wrap Blobs.  And the screenshot module sends the screenshot to content as a blob.

This patch changes the screenshot module to use sendEvent() instead of sendChromeEvent, and manually sets __exposedProps__ on the detail object.

Fabrice, please note that this requires your fix to the reportCrash() bug before it can work correctly.
Attachment #653954 - Flags: review?(fabrice)
Comment on attachment 653954 [details] [diff] [review]
patch

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

r=me with nit addressed

::: b2g/chrome/content/shell.js
@@ +614,4 @@
>          context.DRAWWINDOW_USE_WIDGET_LAYERS;
>        context.drawWindow(window, 0, 0, width, height,
>                           'rgb(255,255,255)', flags);
> +      

Nit: whitespace
Attachment #653954 - Flags: review?(fabrice) → review+
Attachment #653954 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/ecb96c6485ef
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: