Closed Bug 714658 Opened 13 years ago Closed 13 years ago

tab.getThumbnail() is broken

Categories

(Add-on SDK Graveyard :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dietrich, Unassigned)

Details

using nightly build and latest sdk source.

callback is never called and i see this error:

error: An exception occurred.
Traceback (most recent call last):
  File "resource://jid0-oqye1hraxbxalhmto3k4gp9jjwa/api-utils/data/content-proxy.js", line 748, in 
    return wrap(o, obj, name);
  File "resource://jid0-oqye1hraxbxalhmto3k4gp9jjwa/api-utils/data/content-proxy.js", line 266, in wrap
    if ("__isXrayWrapperProxy" in value)
Error: Permission denied to access property '__isXrayWrapperProxy'
How do we know this is a platform dependency, and not an SDK bug?
these errors might not have anything to do with the thumbnail bits.

it turns out the thumbnail problem was a pebkac one. i thought getThumbnail took a callback. it's actually synchronous (which ain't good, methinks).
Dietrich, could you clarify comment 2? Is this actually broken or can we close this?
No longer blocks: 697775
Whiteboard: [triage:followup]
correct. for some reason i thought the method took a callback instead of returning synchronously.

the errors in comment #0 have nothing to do with the tab api afaict - totally unrelated.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Regarding its chronicity, I think synchronicity is ok in this case, as thumbnail generation is speedy enough, doesn't trigger events, and can block an addon running in a different process.

If any of those assumptions are incorrect, however, then it is a problem.  And in general we bias toward asynchronous APIs these days, so we should certainly consider making this one asynchronous (or providing an asynchronous equivalent that we encourage people to use).
Whiteboard: [triage:followup]
You need to log in before you can comment on or make changes to this bug.