Closed Bug 595813 Opened 15 years ago Closed 8 years ago

Add L20n bindings to XBL

Categories

(Core :: XBL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: zbraniecki, Assigned: zbraniecki)

References

Details

Attachments

(1 file, 3 obsolete files)

XBL's XUL should be localizable via L20n. The suggested approach is to hook it via content sink.
Assignee: nobody → gandalf
Blocks: 595812
Status: NEW → ASSIGNED
Attached patch patch v1 (obsolete) — Splinter Review
The code here is very similar to the code used in bug 566906. The main difference is that I had to extend XBLContentSink to provide HandleProcessingInstruction method and I have to use my own context since I cannot get it from the document.
Attachment #474691 - Flags: feedback?(l10n)
Attached patch stop the leak attempt (obsolete) — Splinter Review
Since it seems that I'm leaking here (and not in XUL content-sink case) the suspected leaker is the runtime. Pike suggested taking runtime from the runtime service and the given patch is an attempt to do so. (it works against beta4 on top of that patch). Unfortunately, the suggested fix causes side effect in form of such warnings on shutdown: JS API usage error: found live context at 0x121e8b300 JS API usage error: found live context at 0x121ec9d50 JS API usage error: found live context at 0x121f0a120 JS API usage error: found live context at 0x121f7ba40 JS API usage error: 4 contexts left in runtime upon JS_DestroyRuntime. -- Any attempt to add JS_DestroyContext in XBLContentSink destructor result in a crash. Need help!
Comment on attachment 474691 [details] [diff] [review] patch v1 Comments again here, too ;-) I would think that supporting l10n-data in xbl is a bit pointless as we don't have access to the document later to do dynamic modifications. It's a bit inconsistent though. But I guess either way. Regarding the js context, you'll need to end up in a call to JS_DestroyContext*, not sure which api to use, though. Ask jst on that? I've searched for other call-sites, and that didn't enlighten me at all. It'd be nice if we could factor more of the code here and in xul content sink, I guess.
Attachment #474691 - Flags: feedback?(l10n) → feedback-
Attached patch patch v2 (obsolete) — Splinter Review
patch v2, aligned with latest xul patch.
Attachment #474691 - Attachment is obsolete: true
Attachment #474693 - Attachment is obsolete: true
Attached patch patch v3Splinter Review
* added documentation * synced with XUL patch
Attachment #489690 - Attachment is obsolete: true
Attachment #491157 - Flags: feedback?(l10n)
Blocks: 614536
No longer blocks: 614536
Depends on: 614536
Attachment #491157 - Flags: feedback?(l10n)
Seven years later, we're making another attempt to refactor our l10n layer. The new tracking bug is bug 1365426 and I'll mark the previous effort as "INCOMPLETE".
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: