Closed Bug 1035275 Opened 6 years ago Closed 6 years ago

Imported Chromium code under security/sandbox that is not being compiled.


(Core :: Security, defect)

Not set





(Reporter: bobowen, Assigned: bobowen)




(1 file)

While working on bug 1018966, I noticed that there are some cc files that have been imported from Chromium that are not currently being compiled.

For the sandboxing code this seems to be a deliberate choice to import all files from a directory.

However, given that we are not importing all of the Chromium base code, it seems sensible to remove any code that we are not using.
aklotz concurred in Bug 1018966 Comment 23.

After checking to see which cc files were not being compiled, I've also gone through some iterations of grepping for and removing unused header files.

Here's a patch to remove the files that don't appear to be needed.

The only things I didn't include were path_service.h (because I need it for bug 1018966) and sdkdecls.h (as this is our own file and the comment at the top of it indicates that we do need it).

Here's a try push on top of the patches of bug 1018966:

Obviously things are failing, but these seem pretty consistent with the results without this patch.
Here's another try run without the patch:

The results are pretty much the same, the only differences will pass if you try them enough times.

bbondy: would you be OK for a review on this?
Flags: needinfo?(netzen)
sure thing, just mark me for review if it's ready.
Flags: needinfo?(netzen)
(In reply to Brian R. Bondy [:bbondy] from comment #2)
> sure thing, just mark me for review if it's ready.

Thanks Brian, just realised today as I was looking at someone's build error on IRC that I might need to at least check this compiles for some other platforms.

I've kicked off a try run:

We have people round, so I'll probably flag for review tomorrow, if it works OK.
Comment on attachment 8451720 [details] [diff] [review]
Remove unused base Chromium code

(In reply to Bob Owen (:bobowen) from comment #3)

> I've kicked off a try run:

This only built successfully on B2G, the Linux builds are partly failing for some warnings being treated as errors and partly because of the problem jvoisin found in bug 1035786.

Here's a try push with jvoisin's patch and another to fix the member variable initialisation, looks like there are still others:

Anyway, I don't think any of these problems are down to removing these files and I've built locally on Linux, which doesn't flag these warnings as errors, so I think we are safe to remove these files.
Attachment #8451720 - Flags: review?(netzen)
Sorry for the delay on reviewing, I'm currently traveling. I'll try to get it in during the weekend, but if not on Monday.
Comment on attachment 8451720 [details] [diff] [review]
Remove unused base Chromium code

Review of attachment 8451720 [details] [diff] [review]:

Looks good, thanks for cleaning this up!
Attachment #8451720 - Flags: review?(netzen) → review+
Thanks Brian.

Try push is academic for this as none of it compiles for mozilla-central at the moment, but here's a try push with --enable-context-sandbox.

Build failures for Linux 32 bit are down to Bug 1037215 and test failures are known issues test failures with the content sandbox.
Keywords: checkin-needed
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.