Closed Bug 795544 Opened 12 years ago Closed 12 years ago

Implement StringEncoding API in non-worker windowless context

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: emk, Assigned: emk)

References

Details

Attachments

(2 files, 2 obsolete files)

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)
Attached patch Test update (obsolete) — Splinter Review
Attachment #666162 - 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.
Attachment #666161 - Attachment is obsolete: true
Attachment #666346 - Flags: review?(bzbarsky)
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.
Attachment #666162 - Attachment is obsolete: true
Attachment #666793 - Flags: review+
I hope that we can land this soon, as I need this feature to progress in quite a few bugs.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: