Closed Bug 841067 Opened 12 years ago Closed 12 years ago

Remove in-tree dependencies on crazy GetWrappedNativeOfJSObject behavior

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bholley, Assigned: bholley)

References

Details

Attachments

(4 files)

I'm simplifying a lot of our behavior in bug 658909. I've added in various compat shims for common patterns, but there are a few cases that just need to be fixed. I've separated those out into this bug to reduce the traffic in bug 658909.
sandboxPrototype implements fancy rebinding behavior that makes things work right. It is the "correct" mechanism to prototype a sandbox to a DOM Window.
Attachment #713502 - Flags: review?(jgriffin)
Otherwise, they won't get invoked with the proper |this|.
Attachment #713505 - Flags: review?
Comment on attachment 713502 [details] [diff] [review] Use sandboxPrototype rather than __proto__ for marionette sandboxes. v1 Review of attachment 713502 [details] [diff] [review]: ----------------------------------------------------------------- Awesome, thanks.
Attachment #713502 - Flags: review?(jgriffin) → review+
Attached patch Fix sandbox xhr tests. v1 (deleted) — Splinter Review
Attachment #713526 - Flags: review?(continuation)
Attached patch Fix up CertUtils. v1 (deleted) — Splinter Review
This is yet another piece of broken code that relies on the "find the |this| object" behavior that we're removing. Moreover, it's not caught by our compat hack, because Components.utils is a bizarre object that implements nsIXPCScriptable (giving it a custom JSClass->name that's not XPCWN_NoHelper) while not implementing nsIClassInfo (which would have put the method on the prototype and made this never work in the first place). We _could_ add special support for the Cu JSClass name in our compat hack, but I think we should just fix it here and assume this pattern is not particularly common in external consumers.
Attachment #713527 - Flags: review?(continuation)
Attachment #713505 - Flags: review? → review?(mhammond)
Comment on attachment 713527 [details] [diff] [review] Fix up CertUtils. v1 Sorry, I have no idea what is going on in this test or in this bug so somebody else should look at this. Maybe dtownsend?
Attachment #713527 - Flags: review?(continuation)
Comment on attachment 713526 [details] [diff] [review] Fix sandbox xhr tests. v1 Again, I have no idea what is going on here. peterv has the hg blame for this file.
Attachment #713526 - Flags: review?(continuation)
Attachment #713526 - Flags: review?(bzbarsky)
Attachment #713527 - Flags: review?(bzbarsky)
Comment on attachment 713526 [details] [diff] [review] Fix sandbox xhr tests. v1 r=me
Attachment #713526 - Flags: review?(bzbarsky) → review+
Comment on attachment 713527 [details] [diff] [review] Fix up CertUtils. v1 r=me
Attachment #713527 - Flags: review?(bzbarsky) → review+
Comment on attachment 713505 [details] [diff] [review] Bind methods before injecting them in FrameWorker. v1 Review of attachment 713505 [details] [diff] [review]: ----------------------------------------------------------------- Untested, but we have good test coverage of those functions.
Attachment #713505 - Flags: review?(mhammond) → review+
We landed only the Marionette specific parts of this in mozilla-b2g18, not the full patch.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: