Closed
Bug 1166583
Opened 10 years ago
Closed 10 years ago
Move chromium's MakeTuple function into namespace 'base'
Categories
(Core :: IPC, defect)
Core
IPC
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: botond, Assigned: botond)
References
Details
Attachments
(1 file, 1 obsolete file)
15.61 KB,
patch
|
botond
:
review+
|
Details | Diff | Splinter Review |
Bug 1163328 introduces the class mozilla::Tuple and and the function mozilla::MakeTuple.
The chromium code we have in the tree has a MakeTuple function in the global namespace.
The two can interfere if MakeTuple is called without qualification and the call site in inside namespace mozilla, or mozilla::MakeTuple is found by ADL.
The attached patch resolves this by moving chromium's MakeTuple into the namespace 'base' (where other chromium things live), and adding explicit qualification to call sites where appropriate.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee: nobody → botond
Attachment #8607896 -
Flags: review?(benjamin)
Comment 2•10 years ago
|
||
We could probably just replace Chromium's tuples with MFBT's throughout ipc/, given that we've already done something similar for the smart-pointer classes (bug 1063318). It might be worth doing as a followup to this bug.
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8607896 [details] [diff] [review]
Move chromium's MakeTuple function into namespace 'base'
At Benjamin's request, asking Nathan to review instead.
Attachment #8607896 -
Flags: review?(benjamin) → review?(nfroyd)
![]() |
||
Comment 4•10 years ago
|
||
Comment on attachment 8607896 [details] [diff] [review]
Move chromium's MakeTuple function into namespace 'base'
Review of attachment 8607896 [details] [diff] [review]:
-----------------------------------------------------------------
This makes that mythical future re-import of chromium code harder, but ideally, by the time we do that, they'll be using std::tuple anyway, so r+ except for the security/sandbox/ part.
::: security/sandbox/chromium/base/tuple.h
@@ +426,1 @@
> inline Tuple0 MakeTuple() {
Aw, they haven't removed the tuple implementation from chromium/base/ yet? Boo.
I'm unsure of the procedures for modifying the chromium import under security/sandbox/, so I'm going to bounce this bit to :bobowen.
Attachment #8607896 -
Flags: review?(nfroyd)
Attachment #8607896 -
Flags: review?(bobowen.code)
Attachment #8607896 -
Flags: review+
Comment 5•10 years ago
|
||
(In reply to Nathan Froyd [:froydnj] [:nfroyd] from comment #4)
> I'm unsure of the procedures for modifying the chromium import under
> security/sandbox/, so I'm going to bounce this bit to :bobowen.
Thanks Nathan.
I'd rather we didn't change this unless we have to.
Every change gives it a little more pain when we roll the Chromium sandbox code forward (which I hope to do again soon).
Does this really cause conflicts?
The sandbox code is generally compiled into its own binary, although bits are included in xul for integration purposes.
Flags: needinfo?(botond)
Comment 6•10 years ago
|
||
I agree with comment #5. If we can make changes outside of security/sandbox/chromium instead (and they aren't truly awful) we should. We're specifically trying to avoid having it attain the “mythical” status of ipc/chromium/src.
Assignee | ||
Comment 7•10 years ago
|
||
(In reply to Bob Owen (:bobowen) from comment #5)
> Does this really cause conflicts?
> The sandbox code is generally compiled into its own binary, although bits
> are included in xul for integration purposes.
You're right, the MakeTuple function in the sandbox code doesn't cause conflicts, only the one in ipc/chromium/src. I'll update the patch to leave the sandbox code alone.
Flags: needinfo?(botond)
Assignee | ||
Comment 8•10 years ago
|
||
Updated patch to omit the changes to the sandbox code. Carrying r+ from Nathan.
Attachment #8607896 -
Attachment is obsolete: true
Attachment #8607896 -
Flags: review?(bobowen.code)
Attachment #8612671 -
Flags: review+
Comment 10•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•