RESOLVED FIXED 115448
ipc-posix-shm backwards compatibility
https://bugs.webkit.org/show_bug.cgi?id=115448
Summary ipc-posix-shm backwards compatibility
Simon Cooper
Reported 2013-04-30 15:06:29 PDT
Need backwards compatibility for older ipc-posix-shm operations.
Attachments
Patch (1.81 KB, patch)
2013-04-30 17:35 PDT, Simon Cooper
no flags
Simon Cooper
Comment 1 2013-04-30 17:35:28 PDT
Alexey Proskuryakov
Comment 2 2013-04-30 22:26:46 PDT
Comment on attachment 200194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=200194&action=review r=me > Source/WebKit2/Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:250 > +(if (not (defined? 'ipc-posix-shm*)) > + (define ipc-posix-shm* ipc-posix-shm)) I wish we pre-processed plug-in sandbox profile files, so that we could do conditional compilation. With an #if check, removing obsolete code is much more straightforward. Also, we wouldn't have to merge parts at runtime, as we could simply #include "com.apple.WebKit.plugin-common.sb", and let preprocessor build a complete profile.
WebKit Commit Bot
Comment 3 2013-04-30 23:07:57 PDT
Comment on attachment 200194 [details] Patch Clearing flags on attachment: 200194 Committed r149427: <http://trac.webkit.org/changeset/149427>
WebKit Commit Bot
Comment 4 2013-04-30 23:08:00 PDT
All reviewed patches have been landed. Closing bug.
Simon Cooper
Comment 5 2013-05-01 14:48:20 PDT
(In reply to comment #2) > (From update of attachment 200194 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=200194&action=review > > r=me > > > Source/WebKit2/Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:250 > > +(if (not (defined? 'ipc-posix-shm*)) > > + (define ipc-posix-shm* ipc-posix-shm)) > > I wish we pre-processed plug-in sandbox profile files, so that we could do conditional compilation. With an #if check, removing obsolete code is much more straightforward. This isn't obsolete code -- it provides backwards compatibility. > Also, we wouldn't have to merge parts at runtime, as we could simply #include "com.apple.WebKit.plugin-common.sb", and let preprocessor build a complete profile. This is not a good idea. - This will not work if the AppleConnect profile is moved to a different project. - Forcing cpp preprocessing means that some sort of "compilation step" has to occur before passing to sandbox which makes it harder to develop and debug profiles.
Alexey Proskuryakov
Comment 6 2013-05-01 15:02:34 PDT
> This isn't obsolete code -- it provides backwards compatibility. It will be obsolete relatively soon, at which point we'll certainly forget to remove it, because there is no indication in code about when it can be removed. We know this currently, and being good forward looking engineers, we can pave the path now. Conditional compilation macros is how we do this in other code, so this would be the most straightforward way for profiles too. > - This will not work if the AppleConnect profile is moved to a different project. I can't agree with that. In fact, it's the opposite - having half of the profile in WebKit and another half in a different project is not workable long term. > - Forcing cpp preprocessing means that some sort of "compilation step" has to occur before passing to sandbox which makes it harder to develop and debug profiles. We perform preprocessing for some of the profiles, and haven't had any issues with that yet.
Simon Cooper
Comment 7 2013-05-01 18:20:04 PDT
(In reply to comment #6) > > This isn't obsolete code -- it provides backwards compatibility. > > It will be obsolete relatively soon, at which point we'll certainly forget to remove it, because there is no indication in code about when it can be removed. We know this currently, and being good forward looking engineers, we can pave the path now. If that is the issue, it can certainly be addressed. What specifically do you need to see?
Alexey Proskuryakov
Comment 8 2013-05-01 21:49:07 PDT
CC'ing Mark, as I think that he is the one who most frequently does such cleanup. I _think_ that preprocessor checks like "#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1070" would make it easiest. Alternatively, a FIXME comment explaining when the code can be removed would help us do that eventually, even if with a bit more manual work.
Note You need to log in before you can comment on or make changes to this bug.