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)
Core
XPCOM
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.
| Assignee | ||
Comment 1•8 years ago
|
||
| Assignee | ||
Comment 2•8 years ago
|
||
This lets us replace moz_xstrdup() of string literals with AssignLiteral(),
among other improvements.
Attachment #8919554 -
Flags: review?(nfroyd)
| Assignee | ||
Updated•8 years ago
|
Attachment #8919552 -
Attachment is obsolete: true
Comment 3•8 years ago
|
||
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.
| Assignee | ||
Comment 5•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c2d3e50e7a8ecc231b8d9c0b9ef1c436a1bb6e2e
Bug 1409598 - Change nsIXPCScriptable::className and nsIClassInfo::{contractID,classDescription} from string to AUTF8String. r=froydnj.
Comment 6•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
| Assignee | ||
Comment 7•8 years ago
|
||
> 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.
Description
•