Closed
Bug 1037686
Opened 12 years ago
Closed 12 years ago
Remove js_strdup, replace with UniquePtr-returning method
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: Waldo, Assigned: Waldo)
Details
Attachments
(3 files)
|
5.42 KB,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
|
5.65 KB,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
|
676 bytes,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
There are sufficiently few users we should just do this.
| Assignee | ||
Comment 1•12 years ago
|
||
Attachment #8454722 -
Flags: review?(jimb)
| Assignee | ||
Comment 2•12 years ago
|
||
I *think* the current ownership model lets us make this change basically trivially, unless I'm missing some quirkiness.
Attachment #8454724 -
Flags: review?(jimb)
| Assignee | ||
Comment 3•12 years ago
|
||
Attachment #8454726 -
Flags: review?(jimb)
Comment 4•12 years ago
|
||
Comment on attachment 8454722 [details] [diff] [review]
Change a bunch of users to use a new DuplicateString overload
Review of attachment 8454722 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me.
Attachment #8454722 -
Flags: review?(jimb) → review+
Comment 5•12 years ago
|
||
Comment on attachment 8454724 [details] [diff] [review]
Convert ScriptSource::{filename,introducerFilename}_ to UniquePtr, make !introducerFilename_ formally imply filename_
Review of attachment 8454724 [details] [diff] [review]:
-----------------------------------------------------------------
I can't see anything wrong with this.
::: js/src/jsscript.cpp
@@ +1765,4 @@
> info->uncompressed += mallocSizeOf(uncompressedChars());
> else if (dataType == DataCompressed)
> info->compressed += mallocSizeOf(compressedData());
> + info->misc += mallocSizeOf(this) + mallocSizeOf(filename_.get());
Ignoring introducerFilename_ here is an existing bug, but since you've made introducerFilename_ and filename_ never share storage, you might consider addressing it now and including mallocSizeOf(introducerFilename_.get()) in the count.
Attachment #8454724 -
Flags: review?(jimb) → review+
Comment 6•12 years ago
|
||
Comment on attachment 8454726 [details] [diff] [review]
Remove js_strdup now that no one uses it
Review of attachment 8454726 [details] [diff] [review]:
-----------------------------------------------------------------
What could go wrong?
Attachment #8454726 -
Flags: review?(jimb) → review+
https://hg.mozilla.org/mozilla-central/rev/0df559de573e
https://hg.mozilla.org/mozilla-central/rev/91ebfb14db1d
https://hg.mozilla.org/mozilla-central/rev/f08ebff1dd5a
https://hg.mozilla.org/mozilla-central/rev/ff595341b34f
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•