Closed Bug 1409598 Opened 8 years ago Closed 8 years ago

Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

Details

Attachments

(1 file, 1 obsolete file)

This lets us replace moz_xstrdup() of string literals with AssignLiteral(), among other improvements. The use of nullptr is replaced with empty strings. This should be fine on the JavaScript side because `null` and "" are both falsy.
This lets us replace moz_xstrdup() of string literals with AssignLiteral(), among other improvements.
Attachment #8919554 - Flags: review?(nfroyd)
Attachment #8919552 - Attachment is obsolete: true
Comment on attachment 8919554 [details] [diff] [review] Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String Review of attachment 8919554 [details] [diff] [review]: ----------------------------------------------------------------- Yay. ::: caps/nsScriptSecurityManager.cpp @@ +160,5 @@ > } > > // Helper class to get stuff from the ClassInfo and not waste extra time with > // virtual method calls for things it has already gotten > class ClassInfoData This class seems like a vestige of some bygone era, where it used to do a lot more, but now it seems to just be adding unnecessary complexity. We instantiate it in one place, AFAICT, in CanCreateWrapper, and we never use the caching the class provides, since we only call the relevant methods once. Maybe we should remove it in a followup?
Attachment #8919554 - Flags: review?(nfroyd) → review+
Pushed by nnethercote@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c2d3e50e7a8e Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2d3e50e7a8ecc231b8d9c0b9ef1c436a1bb6e2e Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
> This class seems like a vestige of some bygone era, where it used to do a > lot more, but now it seems to just be adding unnecessary complexity. We > instantiate it in one place, AFAICT, in CanCreateWrapper, and we never use > the caching the class provides, since we only call the relevant methods once. > > Maybe we should remove it in a followup? I did this in bug 1409960.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: