Closed Bug 795544 Opened 8 years ago Closed 8 years ago
Encoding API in non-worker windowless context
Some people want this feature in windowless context.
This is an interim solution until bug 781615 is resolved.
Assignee: nobody → VYV03354
Status: NEW → ASSIGNED
Attachment #666161 - Flags: review?(bzbarsky)
Comment on attachment 666161 [details] [diff] [review] Make StringEncoding API available from xpcshell/jsm I assume you've verified that all globals that come through here have binding proto array set up in their slots and have the right trace hook? If you haven't, please do. Also, document that this is only initializing the ones we want available on all XPConnect globals. r=me with that
Attachment #666161 - Flags: review?(bzbarsky) → review+
Comment on attachment 666162 [details] [diff] [review] Test update r=me
Attachment #666162 - Flags: review?(bzbarsky) → review+
> I assume you've verified that all globals that come through here have > binding proto array set up in their slots and have the right trace hook? > > If you haven't, please do. I haven't, so I have done now. The proto array would be initialized through XPCWrappedNative::WrapNewGlobal > xpc_CreateGlobalObject > AllocateProtoOrIfaceCache for JSCLASS_DOM_GLOBAL jsclasses. All jsclasses with XPCONNECT_GLOBAL_FLAGS (which implies JSCLASS_DOM_GLOBAL) set TraceXPCGlobal as the trace hook. No other jsclasses have JSCLASS_DOM_GLOBAL (modulo DedicatedWorkerGlobalScope). So I believe I can assume that the global is initialized correctly by the presence of MOZ_ASSERT(js::GetObjectClass(global)->flags & JSCLASS_DOM_GLOBAL). I moved GetProtoObject calls to below the assertion. Please correct me if it is wrong. I'm not familiar with the WebIDL bindings machinery so much. > Also, document that this is only initializing the ones we want available on > all XPConnect globals. Done.
Comment on attachment 666346 [details] [diff] [review] Make StringEncoding API available from xpcshell/jsm Thanks for checking the setup. Yes, that sounds reasonable.
Attachment #666346 - Flags: review?(bzbarsky) → review+
Rebased to tip. The previous patch was applied over bug 795542, but this bug got the review earlier.
I hope that we can land this soon, as I need this feature to progress in quite a few bugs.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.