Closed Bug 846316 Opened 12 years ago Closed 9 years ago

The instanceof operator raises exceptions when used in a sandbox with wantXrays=true

Categories

(Firefox :: Untriaged, defect)

19 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: arantius, Unassigned)

References

Details

Attachments

(1 file)

Attached file instanceof-scratchpad-case.js (deleted) —
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0 Build ID: 20130215130331 Steps to reproduce: Get this upstream bug report: https://github.com/greasemonkey/greasemonkey/issues/1716 Reproduce like so: 1. devtools.chrome.enabled = true 2. Open Scratchpad. 3. Environment > Browser 4. Run the attached script. Actual results: I got an "ok" alert from the wantXrays=false sandbox, then an "err" alert from the wantXrays=true sandbox, running the same code. Expected results: The instanceof operator should have worked regardless of xrays.
Attachment #719472 - Attachment mime type: application/octet-stream → text/plain
Depends on: 822399
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
This bug is not (completely) fixed. While bug 822399 fixed this for "Event" other objects still break. Try the original test case with "Blob" substituted for "Event". With Firefox nightly as of 50d25e083421 I see the same failure as from the original description. Also fails: File.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Sure, those will be fixed too when they are converted to WebIDL.
Attachment #719472 - Attachment mime type: text/plain → application/javascript
Attachment #719472 - Attachment mime type: application/javascript → text/javascript
Is this still an issue on latest Firefox versions? e.g. Firefox 43 or Nightly 46
Flags: needinfo?(arantius)
On most pages, no, resolved. On Bugzilla pages (which seem to define a different object named Event), I get a different error, when wantXrays=false. Which might be expected.
Flags: needinfo?(arantius)
Thank you for your prompt response. If the initial issue is resolved, I will mark this as Resolved Worksforme. Regarding the Bugzilla pages that trow a different error (with wantXrays=false), I think you should open a new bug report if you think the behavior is not the expected one or you could reopen this one if you consider it more useful.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: