Hello playmobil,

I'd like you to do a code review.  Please execute
        g4 diff -c 8974994

or point your web browser to
        http://mondrian/8974994

to review the following code:

Change 8974994 by [EMAIL PROTECTED] on 2008/11/12 11:43:10 *pending*

        Add some missing checks that temp file creation succeeds.
        
        R=playmobil
        [EMAIL PROTECTED]
        DELTA=4  (4 added, 0 deleted, 0 changed)
        OCL=8974994

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/byte_store.cc#10 
edit
... //depot/googleclient/gears/opensource/gears/blob/blob_test.cc#13 edit

4 delta lines: 4 added, 0 deleted, 0 changed

Also consider running:
        g4 lint -c 8974994

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8974994 by [EMAIL PROTECTED] on 2008/11/12 11:43:10 *pending*

        Add some missing checks that temp file creation succeeds.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/byte_store.cc#10 
edit
... //depot/googleclient/gears/opensource/gears/blob/blob_test.cc#13 edit

==== //depot/googleclient/gears/opensource/gears/base/common/byte_store.cc#10 - 
c:\src-gears3/googleclient/gears/opensource/gears/base/common/byte_store.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/byte_store.cc       
2008-11-11 18:01:35.000000000 -0800
+++ googleclient/gears/opensource/gears/base/common/byte_store.cc       
2008-11-11 14:23:08.000000000 -0800
@@ -215,6 +215,9 @@
 bool ByteStore::AddDataToFile(const void *data, int64 length) {
   if (!file_.get()) {
     file_.reset(File::CreateNewTempFile());
+    if (!file_.get()) {
+      return false;
+    }
     if (!data_.Empty()) {
       int64 result = file_->Write(data_.Data(0), data_.Size());
       if (result != data_.Size()) {
==== //depot/googleclient/gears/opensource/gears/blob/blob_test.cc#13 - 
c:\src-gears3/googleclient/gears/opensource/gears/blob/blob_test.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/blob/blob_test.cc       2008-11-11 
18:01:35.000000000 -0800
+++ googleclient/gears/opensource/gears/blob/blob_test.cc       2008-11-11 
16:38:14.000000000 -0800
@@ -146,6 +146,7 @@
   uint8 buffer[64];
   const uint8 vec_contents[] = "abcdef";
   scoped_ptr<File> file(File::CreateNewTempFile());
+  TEST_ASSERT(file.get());
   file->Write(vec_contents, sizeof(vec_contents) - 1);
   file->Flush();
 

Reply via email to