Bug 27954

Summary: [Chromium] Make it possible for FileSystem routines to work when outside the sandbox.
Product: WebKit Reporter: Jeremy Orlow <jorlow>
Component: New BugsAssignee: Jeremy Orlow <jorlow>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dumi, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch v1
none
Patch v1
none
Patch v1 fishd: review+

Jeremy Orlow
Reported 2009-08-03 14:44:26 PDT
We can no longer assume that WebKit is always run within a sandbox. Code running in the browser process should not use the VFS. File system operations should be implementable.
Attachments
Patch v1 (11.05 KB, patch)
2009-08-03 14:50 PDT, Jeremy Orlow
no flags
Patch v1 (7.79 KB, patch)
2009-08-03 17:23 PDT, Jeremy Orlow
no flags
Patch v1 (8.77 KB, patch)
2009-08-03 17:36 PDT, Jeremy Orlow
fishd: review+
Jeremy Orlow
Comment 1 2009-08-03 14:50:24 PDT
Created attachment 34005 [details] Patch v1
Jeremy Orlow
Comment 2 2009-08-03 17:23:09 PDT
Created attachment 34029 [details] Patch v1
Dumitru Daniliuc
Comment 3 2009-08-03 17:34:08 PDT
LGTM. Minor: add NOTREACHED()s to SQLiteFileSystemChromium{Mac,Linux}.cpp
Jeremy Orlow
Comment 4 2009-08-03 17:36:31 PDT
Created attachment 34030 [details] Patch v1
Darin Fisher (:fishd, Google)
Comment 5 2009-08-03 17:44:58 PDT
Comment on attachment 34030 [details] Patch v1 > Index: WebCore/platform/chromium/ChromiumBridge.h ... > // File --------------------------------------------------------------- > - static bool getFileSize(const String& path, long long& result); > + static bool sandboxEnabled(); I think sandboxEnabled is not specific to file system stuff. How about putting this in a separate section? > Index: WebCore/platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp ... > // stub for registering Chromium's SQLite VFS for Linux > + ASSERT_NOT_REACHED(); Isn't notImplemented() more correct? > Index: WebCore/platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp ... > // stub for registering Chromium's SQLite VFS for Mac > + ASSERT_NOT_REACHED(); ditto > Index: WebCore/platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp ... > + // FIXME: Make sure there aren't any unintended consequences when VFS code is called in the browser process. > + if (!ChromiumBridge::sandboxEnabled()) { > + ASSERT_NOT_REACHED(); > + return; > + } notImplemented? These issues aren't major, so R=me
Jeremy Orlow
Comment 6 2009-08-03 17:51:54 PDT
(In reply to comment #5) > (From update of attachment 34030 [details]) > > Index: WebCore/platform/chromium/ChromiumBridge.h > ... > > // File --------------------------------------------------------------- > > - static bool getFileSize(const String& path, long long& result); > > + static bool sandboxEnabled(); > > I think sandboxEnabled is not specific to file system stuff. How about putting > this in a separate section? I'll make this change. > > Index: WebCore/platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp > ... > > // stub for registering Chromium's SQLite VFS for Linux > > + ASSERT_NOT_REACHED(); > > Isn't notImplemented() more correct? Not really. notImplemented is not very noisy. In this case, if we're hitting that code, something is very wrong. Either way, the code should be going away as Dumi completes the implementation.
Jeremy Orlow
Comment 7 2009-08-03 18:09:08 PDT
Sending WebCore/ChangeLog Sending WebCore/platform/chromium/ChromiumBridge.h Sending WebCore/platform/chromium/FileSystemChromium.cpp Sending WebCore/platform/sql/chromium/SQLiteFileSystemChromium.cpp Sending WebCore/platform/sql/chromium/SQLiteFileSystemChromiumLinux.cpp Sending WebCore/platform/sql/chromium/SQLiteFileSystemChromiumMac.cpp Sending WebCore/platform/sql/chromium/SQLiteFileSystemChromiumWin.cpp Transmitting file data ....... Committed revision 46741. http://trac.webkit.org/changeset/46741
Note You need to log in before you can comment on or make changes to this bug.