Closed Bug 612673 Opened 14 years ago Closed 13 years ago

document shared state issues with certain APIs

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: myk, Unassigned)

Details

In an e10s world, all APIs that cross the process boundary are asynchronous by default.  In some cases, however, there is no shared state, so we do not expect this asynchronicity to present a problem.

In others, however, there is, and we cannot ensure that it doesn't change between successive API calls without resorting to complicated resource-locking schemes that we are reluctant to implement in an API set designed for casual developers.

In particular, the Clipboard, Selection, Private Browsing, Tabs, and Windows APIs all give addons the ability to access and manipulate chrome and OS objects whose state may change between successive API calls.

For example, the following code might throw, because the contents of the clipboard could change between the call to clipboard.currentFlavors and clipboard.get:

  if (clipboard.currentFlavors.indexOf("text") != -1)
    console.log(clipboard.get("text").toUpperCase());

We should document the issue that such simpler APIs expose.
Component: General → Documentation
QA Contact: general → documentation
Given that we aren't tackling e10s for 1.0, and things may change by the time we do tackle it, it doesn't make sense to leave this bug open.  Instead, we should deal with this issue as part of the process of integrating e10s.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.