pw_stream: SocketStream reports out of range status on connection closed

This allows clients of SocketStream to detect when the connection
has been terminated.

Change-Id: I83c93b72a6ba4b111f501481a880012c869f1c5b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/90900
Reviewed-by: Ted Pudlik <c7372cc3e451acc046049fca9e050bcb2a4a3d11@google.com>
Reviewed-by: Armando Montanez <97ef6fdb231c129ac8827d9f0c4106bfbf57f74f@google.com>
Commit-Queue: Erik Gilling <1100d3bbb092e6691a138903fe8ea324306d03ea@google.com>

--- pw_stream/socket_stream.cc
+++ pw_stream/socket_stream.cc
@@ -125,8 +125,8 @@

   if (bytes_sent < 0 || static_cast<size_t>(bytes_sent) != data.size()) {
     if (errno == EPIPE) {
-      // An EPIPE indicates that the connection is close.  Return as successful
-      // zero length write to inform the caller.
+      // An EPIPE indicates that the connection is close.  Return an OutOfRange
+      // error.
       return Status::OutOfRange();
     }

@@ -137,13 +137,13 @@

 StatusWithSize SocketStream::DoRead(ByteSpan dest) {
   ssize_t bytes_rcvd = recv(connection_fd_, dest.data(), dest.size_bytes(), 0);
-  if (bytes_rcvd < 0) {
+  if (bytes_rcvd == 0) {
+    // Remote peer has closed the connection.
+    Close();
+    return StatusWithSize::OutOfRange();
+  } else if (bytes_rcvd < 0) {
     return StatusWithSize::Unknown();
   }
-
-  // TODO(b/229988958): Return Status::OutOfRange() on connection closed
-  // (bytes_rcvd == 0) This is a breaking API change and needs to be
-  // managed with a soft transition
   return StatusWithSize(bytes_rcvd);
 }


Fix linux_chromeos build, PageTransition rename

TBR=jam@chromium.org
BUG=none
TEST=builds

Review URL: http://codereview.chromium.org/8262004

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@105265 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -168,7 +168,7 @@
                                               false,       // is_main_frame
                                               -1,          // frame_id
                                               ResourceType::MAIN_FRAME,
-                                              PageTransition::LINK,
+                                              content::PAGE_TRANSITION_LINK,
                                               0,           // upload_size
                                               false,       // is_download
                                               true,        // allow_download


P4 to Git Change 1102960 by gandryey@gera-dev-w7 on 2014/12/05 10:51:47

	EPR #410824 - [CQE OCL][CZ][S/G][QR] Two Bolt sample failing on CPU; Faulty CL: 1101352
	- The test performs double maps with different map flags. Optimization could choose different map schemes for each call and memory coherency could be broken. Add extra conditions to detect multiple maps and use the same  path as the first map.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#45 edit

--- runtime/device/gpu/gpumemory.hpp
+++ runtime/device/gpu/gpumemory.hpp
@@ -205,8 +205,15 @@
     //! will cause a switch to indirect map for MAP_READ operations
     bool isDirectMap(uint mapFlags)
     {
-        return (isCacheable() || (owner()->getMemFlags() & CL_MEM_ALLOC_HOST_PTR) ||
-            !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ));
+        return (((isCacheable() || (owner()->getMemFlags() & CL_MEM_ALLOC_HOST_PTR) ||
+            !isHostMemDirectAccess() || !(mapFlags & CL_MAP_READ)) &&
+            // If map(indirect) memory isn't NULL,
+            // then it's a double map from the app with different map flags.
+            // If runtime will provide different regions,
+            // then it won't be able to guarantee coherency
+            (mapMemory_ == NULL)) ||
+            // Keep direct map always if the first map was direct already
+            ((indirectMapCount_ > 1) && (mapMemory_ == NULL)));
     }

 protected:


Shift first/last search fixed

Shift first/last search fixed

--- api/selectionmanagement.cpp
+++ api/selectionmanagement.cpp
@@ -340,7 +340,7 @@
   }
   else
   {
-    while( whichFirst < tmpSelectedSet[ iFirst ] )
+    while( whichFirst > tmpSelectedSet[ iFirst ] )
     {
       ++iFirst;
       if( iFirst >= tmpSelectedSet.size() )
@@ -376,7 +376,7 @@
   }
   else
   {
-    while( whichLast > tmpSelectedSet[ iLast ] )
+    while( whichLast < tmpSelectedSet[ iLast ] )
     {
       --iLast;
       if( iLast == 0 )


INTEGRATION: CWS ooo19126 (1.14.62); FILE MERGED 2005/09/05 13:24:38 rt 1.14.62.1: #i54170# Change license header: remove SISSL

--- sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -1,61 +1,35 @@
 /*************************************************************************
  *
+ *  OpenOffice.org - a multi-platform office productivity suite
+ *
  *  $RCSfile: SlideSorterViewShell.cxx,v $
  *
- *  $Revision: 1.14 $
- *
- *  last change: $Author: kz $ $Date: 2005-07-14 10:17:41 $
- *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
- *
- *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (the "License"); You may not use this file
- *  except in compliance with the License. You may obtain a copy of the
- *  License at http://www.openoffice.org/license.html.
- *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
- *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *  $Revision: 1.15 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-09-09 06:25:56 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/
 #include "SlideSorterViewShell.hxx"


Fix: include result_codes.h

Fix: include result_codes.h

Build broken by gspencer@chromium.org: use of ResultCodes without including chrome/common/result_codes.h.

TBR=sky@chromium.org
BUG=touchui buildbot failure
TEST=none

Review URL: http://codereview.chromium.org/5791003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@69136 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -22,6 +22,7 @@
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/native_web_keyboard_event.h"
 #include "chrome/common/render_messages.h"
+#include "chrome/common/result_codes.h"
 #include "gfx/canvas.h"
 #include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
 #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"


Fix touch build

Fix touch build

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@106206 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -435,7 +435,7 @@
   if (!GetWidget())
     return;

-  gfx::Rect keyboard_rect = *Details<gfx::Rect>(details).ptr();
+  gfx::Rect keyboard_rect = *content::Details<gfx::Rect>(details).ptr();
   if (keyboard_rect != keyboard_rect_) {
     keyboard_rect_ = keyboard_rect;
     gfx::Rect screen_bounds = GetScreenBounds();


Pass MIME type parameter for EME WD 'needkey' on Android

Pass the MIME type of the media data so that it is available in the EME WD
'needkey' event.

BUG=224786

Review URL: https://codereview.chromium.org/146693003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@247325 0039d316-1c4b-4281-b951-d872f2087c98

--- content/renderer/media/android/webmediaplayer_android.cc
+++ content/renderer/media/android/webmediaplayer_android.cc
@@ -1357,8 +1357,8 @@
     init_data_type_ = type;

   const uint8* init_data_ptr = init_data.empty() ? NULL : &init_data[0];
-  // TODO(xhwang): Drop |keySystem| and |sessionId| in keyNeeded() call.
-  client_->keyNeeded(WebString(), WebString(), init_data_ptr, init_data.size());
+  client_->keyNeeded(
+      WebString::fromUTF8(type), init_data_ptr, init_data.size());
 }

 void WebMediaPlayerAndroid::SetDecryptorReadyCB(


oops double debug titles

oops double debug titles

--- WiFiManager.cpp
+++ WiFiManager.cpp
@@ -2453,7 +2453,6 @@
   if(!_debug || _debugLevel < level) return;

   if(_debugLevel >= DEBUG_MAX){
-    _debugPort.println("MEM: ");
     uint32_t free;
     uint16_t max;
     uint8_t frag;


Too lazy to write descriptive message

Too lazy to write descriptive message

--- Winner/main.cpp
+++ Winner/main.cpp
@@ -268,7 +268,7 @@

 std::vector<std::vector<size_t>> combination(const std::vector<size_t> &n, ssize_t k);
 void combination(int arr[], int m, int n, int out[], int outL, std::vector<std::vector<int>> &vec);
-long GetCombinations(std::vector<double> nums);
+long GetCombinations(std::vector<size_t> nums);

 int main()
 {
@@ -295,7 +295,7 @@
         ss << " }" << std::endl;
     }

-    // std::cout << ss.str() << std::endl;
+    std::cout << ss.str() << std::endl;

     auto                          lineL = 2;
     auto *                        out   = new int[lineL];
@@ -321,6 +321,8 @@

     std::cout << ss.str() << std::endl;

+    auto count = GetCombinations(vector);
+    std::cout << count << std::endl;
     return 0;
 }

@@ -394,24 +396,63 @@
     }
 }

-long GetCombinations(std::vector<double> nums)
+long GetCombinations(std::vector<size_t> nums)
 {
-    long combinations = 0;
+    unsigned long int n         = nums.size();
+    unsigned long int n2        = n / 2;
+    unsigned long int numUnique = 1;
+    unsigned long int numCombinations;
+
     std::sort(nums.begin(), nums.end());
-    std::set<std::multiset<double>> super_set;
-
-    do
-    {
-        std::multiset<double> multi_set;
-
-        for (unsigned int i = 0; i < nums.size() / 2; ++i)
-            multi_set.insert(nums[i]);
-
-        auto el = (super_set.insert(multi_set));
-
-        if (el.second) ++combinations;
-
-    } while (std::next_permutation(nums.begin(), nums.end()));
-
-    return combinations;
+    std::vector<int> numReps;
+
+    double testVal = nums[0];
+    numReps.push_back(1);
+
+    for (std::size_t i = 1; i < n; ++i)
+    {
+        if (nums[i] != testVal)
+        {
+            numReps.push_back(1);
+            testVal = nums[i];
+            ++numUnique;
+        }
+        else
+        {
+            ++numReps[numUnique - 1];
+        }
+    }
+
+    int                 myMax, r = n2 + 1;
+    std::vector<double> triangleVec(r);
+    std::vector<double> temp(r);
+    double              tempSum;
+
+    myMax = r;
+    if (myMax > numReps[0] + 1) myMax = numReps[0] + 1;
+
+    for (int i = 0; i < myMax; ++i)
+        triangleVec[i] = 1;
+
+    temp = triangleVec;
+
+    for (std::size_t k = 1; k < numUnique; ++k)
+    {
+        for (int i = n2; i > 0; --i)
+        {
+            myMax = i - numReps[k];
+            if (myMax < 0) myMax = 0;
+
+            tempSum = 0;
+            for (int j = myMax; j <= i; ++j)
+                tempSum += triangleVec[j];
+
+            temp[i] = tempSum;
+        }
+        triangleVec = temp;
+    }
+
+    numCombinations = (unsigned long int)triangleVec[n2];
+
+    return numCombinations;
 }


IECoreAlembic : Fix compile issues on gcc 4.8.3 at IE

--- contrib/IECoreAlembic/src/IECoreAlembic/AlembicScene.cpp
+++ contrib/IECoreAlembic/src/IECoreAlembic/AlembicScene.cpp
@@ -33,6 +33,7 @@
 //////////////////////////////////////////////////////////////////////////

 #include <memory>
+#include <unordered_map>

 #include "boost/tokenizer.hpp"

@@ -660,6 +661,12 @@
 					);
 					m_children[name] = child;
 					return child;
+				}
+				default :
+				{
+					// should never get here
+					assert( nullptr );
+					return nullptr;
 				}
 			}
 		}


Correct `wstring` conversion.

Correct `wstring` conversion.

--- OSBindings/Qt/mainwindow.cpp
+++ OSBindings/Qt/mainwindow.cpp
@@ -291,7 +291,7 @@

 				// Populate request text.
 				QString requestText = romRequestBaseText;
-				requestText += missingRoms.description(0, L'•');
+				requestText += QString::fromWCharArray(missingRoms.description(0, L'•').c_str());
 				ui->missingROMsBox->setPlainText(requestText);
 			} break;
 		}


[C++] Stop SingleThreadedIOService in TestJoynrMessagingConnectorTest

Change-Id: Ie69fd4fa495913dd64123da3335b1943c51bcd44

--- cpp/tests/unit-tests/TestJoynrMessagingConnectorTest.cpp
+++ cpp/tests/unit-tests/TestJoynrMessagingConnectorTest.cpp
@@ -70,6 +70,10 @@
         semaphore(0)
     {
         singleThreadedIOService->start();
+    }
+
+    ~TestJoynrMessagingConnectorTest() {
+        singleThreadedIOService->stop();
     }

     // sets the expectations on the call expected on the MessageSender from the connector


undo precedent change

undo precedent change

--- EMCAL/AliEMCALDigitizer.cxx
+++ EMCAL/AliEMCALDigitizer.cxx
@@ -381,10 +381,10 @@
   Int_t nz   = AliEMCALGetter::GetInstance()->EMCALGeometry()->GetNZ() ;

   if(absId <= nphi*nz) //digitize as tower
-    channel = (Int_t) TMath::Ceil( (energy - fADCpedestalTower)/fADCchannelTower )  ;
+    channel = (Int_t) TMath::Ceil( (energy + fADCpedestalTower)/fADCchannelTower )  ;
   if(channel > fNADCTower ) channel =  fNADCTower ;
   else
-    channel =  (Int_t) TMath::Ceil( (energy - fADCpedestalPreSho)/fADCchannelPreSho )  ;
+    channel =  (Int_t) TMath::Ceil( (energy + fADCpedestalPreSho)/fADCchannelPreSho )  ;
   if(channel > fNADCPreSho ) channel =  fNADCPreSho ;

   return channel ;


update func3

update func3


Removed old preprocessor stuff.

Removed old preprocessor stuff.

--- include/Observation.hpp
+++ include/Observation.hpp
@@ -18,8 +18,7 @@
 #include <utils.hpp>

-#ifndef OBSERVATION_HPP
-#define OBSERVATION_HPP
+#pragma once

 namespace AstroData {

@@ -387,5 +386,3 @@

 } // AstroData

-#endif // OBSERVATION_HPP
-


Fit options simplified to avoid fpe; treatment of parameters at limits introduced.

--- PHOS/AliPHOSPreprocessor.cxx
+++ PHOS/AliPHOSPreprocessor.cxx
@@ -216,9 +216,9 @@

   if(!h1->GetEntries()) return 16.;

-  h1->Rebin(4);
+  if(h1->GetMaximum()<10.) h1->Rebin(4);
   if(h1->GetMaximum()<10.) return 16.;
-
+
   Double_t max = h1->GetBinCenter(h1->GetMaximumBin()); // peak
   Double_t xmin = max - (h1->GetRMS()/3);
   Double_t xmax = max + (h1->GetRMS()/2);
@@ -236,14 +236,15 @@
   Double_t mean_max = h1->GetXaxis()->GetXmax();
   gaus1->SetParLimits(1,mean_min,mean_max);

-  h1->Fit(gaus1,"LERQ+");
-
+  h1->Fit(gaus1,"RQ+");
+  Double_t hg2lg = gaus1->GetParameter("Mean");
+  if( (hg2lg-mean_min<0.001) || (mean_max-hg2lg<0.001)) hg2lg=max;
+
   AliInfo(Form("%s: %.1f entries, mean=%.3f, peak=%.3f, rms= %.3f. HG/LG = %.3f\n",
-	   h1->GetTitle(),h1->GetEntries(),h1->GetMean(),max,h1->GetRMS(),
-	   gaus1->GetParameter("Mean")));
-
-  return gaus1->GetParameter("Mean");
-
+	  h1->GetTitle(),h1->GetEntries(),h1->GetMean(),max,h1->GetRMS(),hg2lg));
+
+  return hg2lg;
+
 }

 Bool_t AliPHOSPreprocessor::FindBadChannelsEmc()


white space.

white space.

git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@22168 27541ba8-7e3a-0410-8455-c3a389f83636

--- math/src/TMath.cxx
+++ math/src/TMath.cxx
@@ -345,13 +345,13 @@
 {
    // Compute factorial(n).

-   if(n <= 0) return 1.;
+   if (n <= 0) return 1.;
    Double_t x = 1;
    Int_t b = 0;
    do {
       b++;
       x *= b;
-   } while(b!=n);
+   } while (b != n);
    return x;
 }

@@ -461,11 +461,11 @@
    // Handbook of Mathematical Functions by Abramowitz and Stegun, formula 6.5.1 on page 260 .
    // Its normalization is such that TMath::Gamma(a,+infinity) = 1 .
    //
-   //  Begin_Latex
-   //  P(a, x) = #frac{1}{#Gamma(a) } #int_{0}^{x} t^{a-1} e^{-t} dt
+   //  Begin_Latex
+   //  P(a, x) = #frac{1}{#Gamma(a) } #int_{0}^{x} t^{a-1} e^{-t} dt
    //   End_Latex
-   //
-   //
+   //
+   //
    //--- Nve 14-nov-1998 UU-SAP Utrecht

    if (a <= 0 || x <= 0) return 0;
@@ -965,9 +965,9 @@
 //  -----------------------------------------------------------
 //   The nuts-and-bolts of the TMath::KolmogorovTest() algorithm is a for-loop
 //   over the two sorted arrays a and b representing empirical distribution
-//   functions. The for-loop handles 3 cases: when the next points to be
+//   functions. The for-loop handles 3 cases: when the next points to be
 //   evaluated satisfy a>b, a<b, or a=b:
-//
+//
 //      for (Int_t i=0;i<na+nb;i++) {
 //         if (a[ia-1] < b[ib-1]) {
 //            rdiff -= sa;
@@ -986,7 +986,7 @@
 //        }
 //         rdmax = TMath::Max(rdmax,TMath::Abs(rdiff));
 //      }
-//
+//
 //   For the last case, a=b, the algorithm advances each array by one index in an
 //   attempt to move through the equality. However, this is incorrect when one or
 //   the other of a or b (or both) have a repeated value, call it x. For the KS
@@ -996,10 +996,10 @@
 //   old CERNLIB method is wrong is that it implies that the function defined as the
 //   difference between a and b is multi-valued at x -- besides being ugly, this
 //   would invalidate Kolmogorov's theorem).
-//
+//
 //   The solution is to just add while-loops into the equality-case handling to
 //   perform the tally:
-//
+//
 //         } else {
 //            double x = a[ia-1];
 //            while(a[ia-1] == x && ia <= na) {


- correct abuse of local variable in bx_param_bool_c::text_ask.  I had created   a temporary char[] buffer, filled it using sprintf, and then used a pointer   to it even after it went out of scope.

--- gui/control.cc
+++ gui/control.cc
@@ -786,9 +786,9 @@
   fprintf (fpout, "\n");
   int status;
   char *prompt = get_ask_format ();
+  char buffer[512];
   if (prompt == NULL) {
     // default prompt, if they didn't set an ask format string
-    char buffer[512];
     sprintf (buffer, "%s? [%%s] ", get_name ());
     prompt = buffer;
   }


video_coding: updating the session info unit test following recent changes
Review URL: http://webrtc-codereview.appspot.com/290002

git-svn-id: 917f5d3ca488f358c4d40eaec14422cf392ccec9@996 4adac7df-926f-26a2-2b94-8c16560cd09d

--- src/modules/video_coding/main/source/session_info_unittest.cc
+++ src/modules/video_coding/main/source/session_info_unittest.cc
@@ -79,7 +79,8 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -89,7 +90,8 @@
   packet_header_.header.sequenceNumber += 2;
   FillPacket(2);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -99,7 +101,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(3);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // One packet should be removed (end of partition 0).
@@ -125,17 +128,19 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 0;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(2);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0)
+            , kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 0;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(2);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -145,7 +150,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(3);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -155,7 +161,8 @@
   packet_header_.header.sequenceNumber += 2;
   FillPacket(5);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // One packet should be removed (end of partition 2), 3 left.
@@ -181,27 +188,30 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 0;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(1);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 1;
-  vp8_header_->beginningOfPartition = true;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(2);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 0;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(1);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 1;
+  vp8_header_->beginningOfPartition = true;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(2);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -211,7 +221,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(3);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // No packet should be removed.
@@ -237,27 +248,30 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 0;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(1);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 1;
-  vp8_header_->beginningOfPartition = true;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(2);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 0;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(1);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 1;
+  vp8_header_->beginningOfPartition = true;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(2);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -267,7 +281,8 @@
   packet_header_.header.sequenceNumber += 2;
   FillPacket(3);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // One packet should be removed from the last partition
@@ -294,17 +309,19 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 0;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(2);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 0;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(2);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -314,7 +331,8 @@
   packet_header_.header.sequenceNumber += 3;
   FillPacket(5);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -324,7 +342,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(6);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // No packet should be removed.
@@ -350,17 +369,19 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 0;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(2);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 0;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(2);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -370,7 +391,8 @@
   packet_header_.header.sequenceNumber += 2;
   FillPacket(4);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -380,7 +402,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(5);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -390,7 +413,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(6);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -400,7 +424,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(7);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // 2 partitions left. 2 packets removed from second partition
@@ -426,17 +451,19 @@
   VCMPacket* packet = new VCMPacket(packet_buffer_, kPacketBufferSize,
                                     packet_header_);
   session_.SetStartSeqNumber(packet_header_.header.sequenceNumber);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
-  delete packet;
-
-  packet_header_.type.Video.isFirstPacket = false;
-  vp8_header_->partitionId = 1;
-  vp8_header_->beginningOfPartition = false;
-  packet_header_.header.markerBit = false;
-  packet_header_.header.sequenceNumber += 1;
-  FillPacket(1);
-  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
+  delete packet;
+
+  packet_header_.type.Video.isFirstPacket = false;
+  vp8_header_->partitionId = 1;
+  vp8_header_->beginningOfPartition = false;
+  packet_header_.header.markerBit = false;
+  packet_header_.header.sequenceNumber += 1;
+  FillPacket(1);
+  packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   packet_header_.type.Video.isFirstPacket = false;
@@ -446,7 +473,8 @@
   packet_header_.header.sequenceNumber += 1;
   FillPacket(2);
   packet = new VCMPacket(packet_buffer_, kPacketBufferSize, packet_header_);
-  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_), kPacketBufferSize);
+  ASSERT_EQ(session_.InsertPacket(*packet, frame_buffer_, false, 0),
+            kPacketBufferSize);
   delete packet;

   // One packet should be removed (end of partition 0).


Add debug step check before break and continue

This allows debuggers to set a breakpoint in a line that contains
a break or continue statement.

When running dart2js on a small program, this adds around 900 DebugStepCheck
runtime calls. I’m not sure the price is worth paying.

BUG=#28473
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2651263002 .

--- runtime/vm/flow_graph_builder.cc
+++ runtime/vm/flow_graph_builder.cc
@@ -2104,6 +2104,11 @@

 void EffectGraphVisitor::VisitJumpNode(JumpNode* node) {
+  if (FLAG_support_debugger && owner()->function().is_debuggable()) {
+    AddInstruction(new (Z) DebugStepCheckInstr(node->token_pos(),
+                                               RawPcDescriptors::kRuntimeCall));
+  }
+
   NestedContextAdjustment context_adjustment(owner(), owner()->context_level());

   for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) {


Making KMail use dollar sign expansion ( env variables ) in order to make
configuring it trivial in a multi-user environment (e.g. skel kmailrc file
with [Account 1] login=$USER ... )

svn path=/trunk/kdenetwork/kmail/; revision=152360

--- kmail/main.cpp
+++ kmail/main.cpp
@@ -301,7 +301,8 @@
   config.writeEntry("pid", getpid());
   config.writeEntry("hostname", hostName);
   config.sync();
-
+
+  kapp->config()->setDollarExpansion( true );
   kapp->dcopClient()->suspend(); // Don't handle DCOP requests yet

   //local, do the init


+  about.addAuthor( "Marc Mutz", QString::null, "mutz@kde.org" );

svn path=/trunk/kdenetwork/kmail/; revision=98626

--- kmail/main.cpp
+++ kmail/main.cpp
@@ -199,6 +199,7 @@
   about.addAuthor( "Lars Knoll", QString::null, "knoll@kde.org" );
   about.addAuthor( "J. Nick Koston", QString::null, "bdraco@darkorb.net" );
   about.addAuthor( "Stephan Kulow", QString::null, "coolo@kde.org" );
+  about.addAuthor( "Marc Mutz", QString::null, "mutz@kde.org" );
   about.addAuthor( "Daniel Naber", QString::null, "daniel.naber@t-online.de" );
   about.addAuthor( "Sven Radej", QString::null, "radej@kde.org" );
   about.addAuthor( "Espen Sand", QString::null, "espen@kde.org" );


Fixed a bug with opcode 0x00EE

Fixed a bug with opcode 0x00EE

Infinite loops are fun

--- Chip8.cpp
+++ Chip8.cpp
@@ -100,7 +100,7 @@
             clearScreen();
             break;
          case 0x000E:   // 0x00EE: Returns from subroutine
-            pc = stack[--sp];
+            pc = stack[--sp] + 2;
             break;
          default:
             {


Small update from code review.

Small update from code review.

--- tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc
+++ tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc
@@ -96,13 +96,13 @@
   // most recent version before the unknown version.
   for (auto iter = m->begin(); iter != m->end(); ++iter) {
     auto k = iter->first;
-    if ((k.first < compute_capability.first) ||
+    if (k.first < compute_capability.first ||
 	(k.first == compute_capability.first &&
 	 k.second <= compute_capability.second)) {
       sm_version = iter->second;
     }
   }
-  std::cout << "SM " << sm_version;
+
   if (sm_version != compute_capability.first*10 + compute_capability.second) {
     LOG(WARNING) << "Unknown compute capability (" << compute_capability.first
                  << ", " << compute_capability.second << ") ."


yet more cleanup

yet more cleanup

--- ksp_plugin/planetarium.cpp
+++ ksp_plugin/planetarium.cpp
@@ -164,8 +164,7 @@

   Instant t;
   double estimated_tan²_error;
-  Position<Navigation> position_in_navigation;
-  Displacement<Camera> displacement_from_camera;
+  Position<Navigation> position;

   std::experimental::optional<Position<Navigation>> last_endpoint;

@@ -186,20 +185,19 @@
       Position<Navigation> const estimated_position =
           previous_position + previous_velocity * Δt;

-      position_in_navigation =
-          plotting_frame_->ToThisFrameAtTime(t).rigid_transformation()(
-              trajectory.EvaluatePosition(t));
+      position = plotting_frame_->ToThisFrameAtTime(t).rigid_transformation()(
+                     trajectory.EvaluatePosition(t));

       estimated_tan²_error =
           perspective_.Tan²AngularDistance(estimated_position,
-                                           position_in_navigation);
+                                           position);
       ++steps_attempted;
     } while (estimated_tan²_error > tan²_angular_resolution);
     ++steps_accepted;
     auto const segments =
         perspective_.VisibleSegments(
             Segment<Displacement<Navigation>>(previous_position,
-                                              position_in_navigation),
+                                              position),
             plottable_spheres);
     for (auto const& full_segment : segments) {
       // TODO(egg): also limit to field of view.
@@ -215,11 +213,10 @@
       last_endpoint = segment->second;
     }

+    previous_position = position;
+    previous_velocity = plotting_frame_->ToThisFrameAtTime(t).orthogonal_map()(
+                            trajectory.EvaluateVelocity(t));
     previous_time = t;
-    previous_position = position_in_navigation;
-    previous_velocity =
-        plotting_frame_->ToThisFrameAtTime(t).orthogonal_map()(
-            trajectory.EvaluateVelocity(t));
   }
   LOG(INFO) << "PlotMethod2 took " << steps_accepted << " steps, attempted "
             << steps_attempted << " steps.";


Disable forceshutdown.
TEST=none
BUG=70793
Review URL: http://codereview.chromium.org/6293019

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@72520 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/service/service_process_control_browsertest.cc
+++ chrome/browser/service/service_process_control_browsertest.cc
@@ -186,7 +186,9 @@
   WaitForShutdown();
 }

-IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, ForceShutdown) {
+//http://code.google.com/p/chromium/issues/detail?id=70793
+IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest,
+                       DISABLED_ForceShutdown) {
   // Launch the service process.
   LaunchServiceProcessControl();
   // Make sure we are connected to the service process.


Backport 2f0bc01 to 1.9: Fix bug causing random crash during module initialization

--- dtool/src/interrogate/interfaceMakerPythonNative.cxx
+++ dtool/src/interrogate/interfaceMakerPythonNative.cxx
@@ -1198,6 +1198,10 @@

     if (!isExportThisRun(wrapped_itype._cpptype)) {
       _external_imports.insert(wrapped_itype._cpptype);
+    } else {
+      // If this is a typedef to a class defined in the same module, make sure
+      // that the class is initialized before we try to define the typedef.
+      out << "  Dtool_PyModuleClassInit_" << class_name << "(module);\n";
     }
   }

@@ -2595,6 +2599,12 @@
   out << "#if PY_VERSION_HEX >= 0x02050000\n";
   write_function_slot(out, 2, slots, "nb_index");
   out << "#endif\n";
+
+  out << "#if PY_VERSION_HEX >= 0x03050000\n";
+  write_function_slot(out, 2, slots, "nb_matrix_multiply");
+  write_function_slot(out, 2, slots, "nb_inplace_matrix_multiply");
+  out << "#endif\n";
+
   out << "};\n\n";

   // NB: it's tempting not to write this table when a class doesn't have them.
@@ -2842,6 +2852,10 @@
   // unsigned int tp_version_tag
   out << "#if PY_VERSION_HEX >= 0x02060000\n";
   out << "    0, // tp_version_tag\n";
+  out << "#endif\n";
+  // destructor tp_finalize
+  out << "#if PY_VERSION_HEX >= 0x03040000\n";
+  out << "    0, // tp_finalize\n";
   out << "#endif\n";
   out << "  },\n";
   out << "  Dtool_UpcastInterface_" << ClassName << ",\n";


add Judd-Vos CMFs

add Judd-Vos CMFs


Fix GCC bustage.  Part 2.

Fix GCC bustage.  Part 2.

TEST=none
BUG=none
TBR=dglazkov

Review URL: http://codereview.chromium.org/147073

git-svn-id: http://src.chromium.org/svn/trunk/src@19105 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: fd067b19fdafcf6177acaf0bd4ee7576f32d0a06

--- webkit/api/src/WebURLRequest.cpp
+++ webkit/api/src/WebURLRequest.cpp
@@ -150,7 +150,7 @@

 WebHTTPBody WebURLRequest::httpBody() const
 {
-    return m_private->m_resourceRequest->httpBody();
+    return WebHTTPBody(m_private->m_resourceRequest->httpBody());
 }

 void WebURLRequest::setHTTPBody(const WebHTTPBody& httpBody)


Complete the doc

Complete the doc

--- include/etl/context.hpp
+++ include/etl/context.hpp
@@ -46,44 +46,73 @@

 namespace detail {

+/*!
+ * \brief Return the forced_impl of the local context for the given enumeration type
+ * \tparam T The type of enumeration of implmentation
+ * \return the forced_impl of the given type for the local context
+ */
 template<typename T>
 forced_impl<T>& get_forced_impl();

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<scalar_impl>& get_forced_impl(){
     return local_context().scalar_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<sum_impl>& get_forced_impl(){
     return local_context().sum_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<transpose_impl>& get_forced_impl(){
     return local_context().transpose_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<dot_impl>& get_forced_impl(){
     return local_context().dot_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<conv_impl>& get_forced_impl(){
     return local_context().conv_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<gemm_impl>& get_forced_impl(){
     return local_context().gemm_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<outer_impl>& get_forced_impl(){
     return local_context().outer_selector;
 }

+/*!
+ * \copydoc get_forced_impl
+ */
 template<>
 inline forced_impl<fft_impl>& get_forced_impl(){
     return local_context().fft_selector;
@@ -93,17 +122,30 @@
  * \brief RAII helper for setting the context to serial
  */
 struct serial_context {
-    bool old_serial;
-
+    bool old_serial; ///< The previous value of serial
+
+    /*!
+     * \brief Default construct a serial context
+     *
+     * This saves the previous serial value and sets serial to true
+     */
     serial_context(){
         old_serial = etl::local_context().serial;
         etl::local_context().serial = true;
     }

+    /*!
+     * \brief Destruct a serial context
+     *
+     * This restores the serial state
+     */
     ~serial_context(){
         etl::local_context().serial = old_serial;
     }

+    /*!
+     * \brief Does nothing, simple trick for section to be nice
+     */
     operator bool(){
         return true;
     }
@@ -113,17 +155,30 @@
  * \brief RAII helper for setting the context to parallel
  */
 struct parallel_context {
-    bool old_parallel;
-
+    bool old_parallel; ///< The previous value of parallel
+
+    /*!
+     * \brief Default construct a parallel context
+     *
+     * This saves the previous parallel value and sets parallel to true
+     */
     parallel_context(){
         old_parallel = etl::local_context().parallel;
         etl::local_context().parallel = true;
     }

+    /*!
+     * \brief Destruct a parallel context
+     *
+     * This restores the parallel state
+     */
     ~parallel_context(){
         etl::local_context().parallel = old_parallel;
     }

+    /*!
+     * \brief Does nothing, simple trick for section to be nice
+     */
     operator bool(){
         return true;
     }
@@ -135,8 +190,14 @@
  */
 template<typename Selector, Selector V>
 struct selected_context {
-    forced_impl<Selector> old_selector;
-
+    forced_impl<Selector> old_selector; ///< The previous value of selector
+
+    /*!
+     * \brief Default construct a selected context
+     *
+     * This saves the previous selector value and sets selector to
+     * the specified implementation.
+     */
     selected_context(){
         decltype(auto) selector = get_forced_impl<Selector>();

@@ -146,10 +207,18 @@
         selector.forced = true;
     }

+    /*!
+     * \brief Destruct a selected context
+     *
+     * This restores the selector state
+     */
     ~selected_context(){
         get_forced_impl<Selector>() = old_selector;
     }

+    /*!
+     * \brief Does nothing, simple trick for section to be nice
+     */
     operator bool(){
         return true;
     }


Update localized_strings.cc post-merge
Review URL: http://codereview.chromium.org/6497

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@2890 0039d316-1c4b-4281-b951-d872f2087c98

--- webkit/glue/localized_strings.cc
+++ webkit/glue/localized_strings.cc
@@ -124,12 +124,14 @@
 }

 // These two are used in FileChooserWin.cpp.
+#if PLATFORM(WIN)
 String WebCore::uploadFileText() {
   return String();
 }
 String WebCore::allFilesText() {
   return String();
 }
+#endif

 // The following two functions are not declared in LocalizedStrings.h.
 // They are used by the menu for the HTML keygen tag.
@@ -142,7 +144,7 @@
 }

 // Used in ImageDocument.cpp as the title for pages when that page is an image.
-String WebCore::imageTitle(const String& filename, const IntSize& size) {
+String imageTitle(const String& filename, const IntSize& size) {
   // C3 97 is UTF-8 for U+00D7 (multiplication sign).
   std::string size_str = StringPrintf(" (%d\xC3\x97%d)",
                                       size.width(), size.height());


INTEGRATION: CWS dba24 (1.4.262); FILE MERGED 2005/02/09 08:07:56 oj 1.4.262.1: #i26950# remove the need for XNamed

--- connectivity/source/inc/mozaddressbook/MABColumns.hxx
+++ connectivity/source/inc/mozaddressbook/MABColumns.hxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: MABColumns.hxx,v $
  *
- *  $Revision: 1.4 $
+ *  $Revision: 1.5 $
  *
- *  last change: $Author: oj $ $Date: 2001-10-12 11:53:28 $
+ *  last change: $Author: vg $ $Date: 2005-03-10 15:40:34 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -73,7 +73,7 @@
         class OMozabColumns : public file::OColumns
         {
         protected:
-            virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed > createObject(const ::rtl::OUString& _rName);
+            virtual sdbcx::ObjectType createObject(const ::rtl::OUString& _rName);
         public:
             OMozabColumns(file::OFileTable* _pTable,
                             ::osl::Mutex& _rMutex,


Only write the image when writeImage is called.  We don't write the
other formats because when pasting, we want to make sure the image
has priority.

This method appears to only be called from the image context menu
and when viewing an image only in a tab and using copy (ctrl+c or from
the page menu).  In both of these cases, if the user wants the URL,
they can use the context menu "copy image url" to get the URL.

BUG=21593

Review URL: http://codereview.chromium.org/254006

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@27439 0039d316-1c4b-4281-b951-d872f2087c98

--- webkit/glue/webclipboard_impl.cc
+++ webkit/glue/webclipboard_impl.cc
@@ -156,11 +156,8 @@
     scw.WriteBitmapFromPixels(bitmap.getPixels(), image.size());
   }

-  if (!url.isEmpty()) {
-    scw.WriteBookmark(title, url.spec());
-    scw.WriteHTML(UTF8ToUTF16(URLToImageMarkup(url, title)), "");
-    scw.WriteText(UTF8ToUTF16(url.spec()));
-  }
+  // We intentionally only write the image.  If the user wants the URL, they
+  // can get that from the context menu.
 }

 bool WebClipboardImpl::ConvertBufferType(Buffer buffer,


Restore NOTREACHED() in WebKitClientImpl::loadResource()

BUG=50675
TEST=none

Review URL: http://codereview.chromium.org/7316019

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@91767 0039d316-1c4b-4281-b951-d872f2087c98

--- webkit/glue/webkitclient_impl.cc
+++ webkit/glue/webkitclient_impl.cc
@@ -346,56 +346,62 @@
   return WebData();
 }

+struct DataResource {
+  const char* name;
+  int id;
+};
+
+const DataResource kDataResources[] = {
+  { "missingImage", IDR_BROKENIMAGE },
+  { "mediaPause", IDR_MEDIA_PAUSE_BUTTON },
+  { "mediaPlay", IDR_MEDIA_PLAY_BUTTON },
+  { "mediaPlayDisabled", IDR_MEDIA_PLAY_BUTTON_DISABLED },
+  { "mediaSoundDisabled", IDR_MEDIA_SOUND_DISABLED },
+  { "mediaSoundFull", IDR_MEDIA_SOUND_FULL_BUTTON },
+  { "mediaSoundNone", IDR_MEDIA_SOUND_NONE_BUTTON },
+  { "mediaSliderThumb", IDR_MEDIA_SLIDER_THUMB },
+  { "mediaVolumeSliderThumb", IDR_MEDIA_VOLUME_SLIDER_THUMB },
+  { "panIcon", IDR_PAN_SCROLL_ICON },
+  { "searchCancel", IDR_SEARCH_CANCEL },
+  { "searchCancelPressed", IDR_SEARCH_CANCEL_PRESSED },
+  { "searchMagnifier", IDR_SEARCH_MAGNIFIER },
+  { "searchMagnifierResults", IDR_SEARCH_MAGNIFIER_RESULTS },
+  { "textAreaResizeCorner", IDR_TEXTAREA_RESIZER },
+  { "tickmarkDash", IDR_TICKMARK_DASH },
+  { "inputSpeech", IDR_INPUT_SPEECH },
+  { "inputSpeechRecording", IDR_INPUT_SPEECH_RECORDING },
+  { "inputSpeechWaiting", IDR_INPUT_SPEECH_WAITING },
+  { "americanExpressCC", IDR_AUTOFILL_CC_AMEX },
+  { "dinersCC", IDR_AUTOFILL_CC_DINERS },
+  { "discoverCC", IDR_AUTOFILL_CC_DISCOVER },
+  { "genericCC", IDR_AUTOFILL_CC_GENERIC },
+  { "jcbCC", IDR_AUTOFILL_CC_JCB },
+  { "masterCardCC", IDR_AUTOFILL_CC_MASTERCARD },
+  { "soloCC", IDR_AUTOFILL_CC_SOLO },
+  { "visaCC", IDR_AUTOFILL_CC_VISA },
+};
+
 }  // namespace

 WebData WebKitClientImpl::loadResource(const char* name) {
-  struct {
-    const char* name;
-    int id;
-  } resources[] = {
-    { "missingImage", IDR_BROKENIMAGE },
-    { "mediaPause", IDR_MEDIA_PAUSE_BUTTON },
-    { "mediaPlay", IDR_MEDIA_PLAY_BUTTON },
-    { "mediaPlayDisabled", IDR_MEDIA_PLAY_BUTTON_DISABLED },
-    { "mediaSoundDisabled", IDR_MEDIA_SOUND_DISABLED },
-    { "mediaSoundFull", IDR_MEDIA_SOUND_FULL_BUTTON },
-    { "mediaSoundNone", IDR_MEDIA_SOUND_NONE_BUTTON },
-    { "mediaSliderThumb", IDR_MEDIA_SLIDER_THUMB },
-    { "mediaVolumeSliderThumb", IDR_MEDIA_VOLUME_SLIDER_THUMB },
-    { "panIcon", IDR_PAN_SCROLL_ICON },
-    { "searchCancel", IDR_SEARCH_CANCEL },
-    { "searchCancelPressed", IDR_SEARCH_CANCEL_PRESSED },
-    { "searchMagnifier", IDR_SEARCH_MAGNIFIER },
-    { "searchMagnifierResults", IDR_SEARCH_MAGNIFIER_RESULTS },
-    { "textAreaResizeCorner", IDR_TEXTAREA_RESIZER },
-    { "tickmarkDash", IDR_TICKMARK_DASH },
-    { "inputSpeech", IDR_INPUT_SPEECH },
-    { "inputSpeechRecording", IDR_INPUT_SPEECH_RECORDING },
-    { "inputSpeechWaiting", IDR_INPUT_SPEECH_WAITING },
-    { "americanExpressCC", IDR_AUTOFILL_CC_AMEX },
-    { "dinersCC", IDR_AUTOFILL_CC_DINERS },
-    { "discoverCC", IDR_AUTOFILL_CC_DISCOVER },
-    { "genericCC", IDR_AUTOFILL_CC_GENERIC },
-    { "jcbCC", IDR_AUTOFILL_CC_JCB },
-    { "masterCardCC", IDR_AUTOFILL_CC_MASTERCARD },
-    { "soloCC", IDR_AUTOFILL_CC_SOLO },
-    { "visaCC", IDR_AUTOFILL_CC_VISA },
-  };
+  // Some clients will call into this method with an empty |name| when they have
+  // optional resources.  For example, the PopupMenuChromium code can have icons
+  // for some Autofill items but not for others.
+  if (!strlen(name))
+    return WebData();

   // Check the name prefix to see if it's an audio resource.
-  if (StartsWithASCII(name, "IRC_Composite", true)) {
+  if (StartsWithASCII(name, "IRC_Composite", true))
     return loadAudioSpatializationResource(name);
-  } else {
-    for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) {
-      if (!strcmp(name, resources[i].name)) {
-        base::StringPiece resource = GetDataResource(resources[i].id);
-        return WebData(resource.data(), resource.size());
-      }
+
+  for (size_t i = 0; i < arraysize(kDataResources); ++i) {
+    if (!strcmp(name, kDataResources[i].name)) {
+      base::StringPiece resource = GetDataResource(kDataResources[i].id);
+      return WebData(resource.data(), resource.size());
     }
   }
-  // TODO(jhawkins): Restore this NOTREACHED once WK stops sending in empty
-  // strings. http://crbug.com/50675.
-  //NOTREACHED() << "Unknown image resource " << name;
+
+  NOTREACHED() << "Unknown image resource " << name;
   return WebData();
 }


Disable IncognitoSplitMode for linux, it's hanging there too.

BUG=53991
TEST=no
TBR=aa

Review URL: http://codereview.chromium.org/3225013

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@58065 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/extensions/extension_incognito_apitest.cc
+++ chrome/browser/extensions/extension_incognito_apitest.cc
@@ -97,8 +97,8 @@

 // Tests that the APIs in an incognito-enabled split-mode extension work
 // properly.
-#if defined(OS_CHROMEOS)
-// Hanging on ChromeOS: http://crbug.com/53991
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+// Hanging on ChromeOS and linux: http://crbug.com/53991
 #define MAYBE_IncognitoSplitMode DISABLED_IncognitoSplitMode
 #else
 #define MAYBE_IncognitoSplitMode IncognitoSplitMode


Layout tests expect the time to be relative to the unix epoch.

base::Time is relative to the windows epoch, and base::TimeTicks is entirely
platform dependent. Decision: use base::Time and manually shift it relative to
the unix epoch

This fixes fast/mediastream/RTCPeerConnection-stats*html

BUG=none
R=tony@chromium.org

Review URL: https://codereview.chromium.org/12212107

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@181919 0039d316-1c4b-4281-b951-d872f2087c98

--- webkit/support/webkit_support.cc
+++ webkit/support/webkit_support.cc
@@ -749,8 +749,9 @@
 }

 int64 GetCurrentTimeInMillisecond() {
-  return base::TimeTicks::Now().ToInternalValue()
-      / base::Time::kMicrosecondsPerMillisecond;
+  return base::TimeDelta(base::Time::Now() -
+                         base::Time::UnixEpoch()).ToInternalValue() /
+         base::Time::kMicrosecondsPerMillisecond;
 }

 std::string EscapePath(const std::string& path) {


Re-enabling browser_tests:ExtensionApiTest.ProcessesVsTaskManager.

The test works without error. This CL is the revert of r119621.

TBR=maruel@google.com
BUG=111787
TEST=test passes on trybots and my workstation.

Review URL: https://chromiumcodereview.appspot.com/10163019

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@133410 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/browser/extensions/extension_processes_apitest.cc
+++ chrome/browser/extensions/extension_processes_apitest.cc
@@ -24,13 +24,7 @@
   ASSERT_TRUE(RunExtensionTest("processes/api")) << message_;
 }

-// http://crbug.com/111787
-#ifdef OS_WIN
-#define MAYBE_ProcessesVsTaskManager DISABLED_ProcessesVsTaskManager
-#else
-#define MAYBE_ProcessesVsTaskManager ProcessesVsTaskManager
-#endif
-IN_PROC_BROWSER_TEST_F(ExtensionApiTest, MAYBE_ProcessesVsTaskManager) {
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ProcessesVsTaskManager) {
   CommandLine::ForCurrentProcess()->AppendSwitch(
       switches::kEnableExperimentalExtensionApis);


Remove #if defined(OS_POSIX) so code can be used in windows print preview.

BUG=none
TEST=trybots
Review URL: http://codereview.chromium.org/6675051

git-svn-id: http://src.chromium.org/svn/trunk/src@79887 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

Former-commit-id: 8af3374dc1b94f07b81ae99eeae58f78c145c415

--- chrome/browser/printing/print_preview_message_handler.cc
+++ chrome/browser/printing/print_preview_message_handler.cc
@@ -61,7 +61,6 @@
   if (!print_preview_tab)
     return;

-#if defined(OS_POSIX)
   base::SharedMemory* shared_buf =
       new base::SharedMemory(params.metafile_data_handle, true);
   if (!shared_buf->Map(params.data_size)) {
@@ -77,7 +76,6 @@
       std::make_pair(shared_buf, params.data_size));
   print_preview_ui->PreviewDataIsAvailable(params.expected_pages_count,
                                            tab_contents()->GetTitle());
-#endif  // defined(OS_POSIX)
 }

 void PrintPreviewMessageHandler::OnPrintPreviewNodeUnderContextMenu() {


Fix crash bug when attempting to download a url with unsupported scheme,
e.g. 'data:', by 'Alt + Click'.

Note: This change only fixes crash. Supporting a download for URL
with 'data:' scheme is not implemented in the change.

BUG=24846
TEST=See the first entry of bug 24846 and confirm that the browser won't crash.

Original patch by hayato@google.com at
http://codereview.chromium.org/287002/show

Review URL: http://codereview.chromium.org/306007

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@29524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -730,9 +730,10 @@
                                               receiver_);
   }

-  bool known_proto = URLRequest::IsHandledURL(url);
-  if (!known_proto) {
-    CHECK(false);
+  if (!URLRequest::IsHandledURL(url)) {
+    LOG(INFO) << "Download request for unsupported protocol: " <<
+        url.possibly_invalid_spec();
+    return;
   }

   request->set_method("GET");


don't call the backend for invalid frontend objects (a frontend object is !isValid() if there's no backend object, and none can be created)

svn path=/trunk/KDE/kdelibs/phonon/; revision=651904

--- abstractmediaproducer.cpp
+++ abstractmediaproducer.cpp
@@ -73,8 +73,7 @@
 	if( d->videoPaths.contains( videoPath ) )
 		return false;

-	if( iface() )
-	{
+    if (iface() && videoPath->iface()) {
 		if( qobject_cast<MediaProducerInterface*>( d->backendObject )->addVideoPath( videoPath->iface() ) )
 		{
             d->addDestructionHandler(videoPath, d);
@@ -91,8 +90,7 @@
 	if( d->audioPaths.contains( audioPath ) )
 		return false;

-	if( iface() )
-	{
+    if (iface() && audioPath->iface()) {
 		if( qobject_cast<MediaProducerInterface*>( d->backendObject )->addAudioPath( audioPath->iface() ) )
 		{
             d->addDestructionHandler(audioPath, d);
@@ -127,28 +125,31 @@
 void AbstractMediaProducer::selectAudioStream( const QString& streamName, AudioPath* audioPath )
 {
 	K_D( AbstractMediaProducer );
-	if( iface() )
+    if (iface() && audioPath->iface()) {
         INTERFACE_CALL(selectAudioStream(streamName, audioPath->iface()));
-	else
+    } else {
 		d->selectedAudioStream[ audioPath ] = streamName;
+    }
 }

 void AbstractMediaProducer::selectVideoStream( const QString& streamName, VideoPath* videoPath )
 {
 	K_D( AbstractMediaProducer );
-	if( iface() )
+    if (iface() && videoPath->iface()) {
         INTERFACE_CALL(selectVideoStream(streamName, videoPath->iface()));
-	else
+    } else {
 		d->selectedVideoStream[ videoPath ] = streamName;
+    }
 }

 void AbstractMediaProducer::selectSubtitleStream( const QString& streamName, VideoPath* videoPath )
 {
 	K_D( AbstractMediaProducer );
-	if( iface() )
+    if (iface() && videoPath->iface()) {
         INTERFACE_CALL(selectSubtitleStream(streamName, videoPath->iface()));
-	else
+    } else {
 		d->selectedSubtitleStream[ videoPath ] = streamName;
+    }
 }

 QList<VideoPath*> AbstractMediaProducer::videoPaths() const
@@ -296,13 +297,15 @@

 	foreach( AudioPath* a, d->audioPaths )
 	{
-		if( !qobject_cast<MediaProducerInterface*>( d->backendObject )->addAudioPath( a->iface() ) )
+        if (!a->iface() || !INTERFACE_CALL(addAudioPath(a->iface()))) {
 			d->audioPaths.removeAll( a );
+        }
 	}
 	foreach( VideoPath* v, d->videoPaths )
 	{
-		if( !qobject_cast<MediaProducerInterface*>( d->backendObject )->addVideoPath( v->iface() ) )
+        if (!v->iface() || !INTERFACE_CALL(addVideoPath(v->iface()))) {
 			d->videoPaths.removeAll( v );
+        }
 	}

 	switch( d->state )
@@ -377,14 +380,16 @@
 	VideoPath* videoPath = static_cast<VideoPath*>( o );
 	if( audioPaths.contains( audioPath ) )
 	{
-		if( backendObject )
-			qobject_cast<MediaProducerInterface*>( backendObject )->removeAudioPath( audioPath->iface() );
+        if (backendObject && audioPath->iface()) {
+            pINTERFACE_CALL(removeAudioPath(audioPath->iface()));
+        }
 		audioPaths.removeAll( audioPath );
 	}
 	else if( videoPaths.contains( videoPath ) )
 	{
-		if( backendObject )
-			qobject_cast<MediaProducerInterface*>( backendObject )->removeVideoPath( videoPath->iface() );
+        if (backendObject && videoPath->iface()) {
+            pINTERFACE_CALL(removeVideoPath(videoPath->iface()));
+        }
 		videoPaths.removeAll( videoPath );
 	}
 }


Don't run SingleProcessMemoryTracingTest on Google Chrome builds

switches::kSingleProcess is not supported when GOOGLE_CHROME_BUILD is set.

BUG=524209
TBR=dsinclair@chromium.org

Review URL: https://codereview.chromium.org/1311313002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#345284}


split input into multiple statements

split input into multiple statements

--- Console.cpp
+++ Console.cpp
@@ -258,14 +258,7 @@
 	clang::SourceManager sm;

 	while (isspace(*line)) line++;
-/*
-{
-clang::SourceManager mysm;
-std::vector<string> split;
-string input = line;
-splitInput(src, input, &mysm, &split);
-}
-*/
+
 	*hadErrors = false;
 	if (*line == '#') {
 		moreLines->push_back(CodeLine(line, PrprLine));
@@ -310,7 +303,6 @@

 void Console::process(const char *line)
 {
-	string fName;
 	clang::QualType retType(0, 0);
 	std::vector<CodeLine> linesToAppend;
 	bool hadErrors = false;
@@ -322,7 +314,6 @@
 	int indentLevel;
 	const clang::FunctionDecl *FD;
 	bool shouldBeTopLevel = false;
-	// TODO: split input! (if multiple statements on a single line)
 	switch (p.analyzeInput(src, _buffer, indentLevel, FD)) {
 		case Parser::Incomplete:
 			_input = string(indentLevel * 2, ' ');
@@ -343,23 +334,39 @@
 			oprintf(_err, "Treating input as top-level.\n");
 		appendix = _buffer;
 		linesToAppend.push_back(CodeLine(getFunctionDeclAsString(FD), DeclLine));
+		_buffer.clear();
+
+		if (hadErrors)
+			return;
+
+		src = genSource(appendix);
+		string empty;
+		if (compileLinkAndRun(src, empty, retType)) {
+			for (unsigned i = 0; i < linesToAppend.size(); ++i)
+				_lines.push_back(linesToAppend[i]);
+		}
 	} else {
 		if (_debugMode)
 			oprintf(_err, "Treating input as function-level.\n");
-		appendix = genAppendix(src.c_str(), _buffer.c_str(), &fName, retType, &linesToAppend, &hadErrors);
-	}
-	_buffer.clear();
-
-	if (hadErrors)
-		return;
-
-	src = genSource(appendix);
-
-	if (compileLinkAndRun(src, fName, retType)) {
-		for (unsigned i = 0; i < linesToAppend.size(); ++i)
-			_lines.push_back(linesToAppend[i]);
-	}
-
+		clang::SourceManager sm;
+		std::vector<string> split;
+		string input = line;
+		splitInput(src, input, &sm, &split);
+		_buffer.clear();
+
+		for (unsigned i = 0; i < split.size(); i++) {
+			string fName;
+			appendix = genAppendix(src.c_str(), split[i].c_str(), &fName, retType, &linesToAppend, &hadErrors);
+			if (hadErrors)
+				return;
+			src = genSource(appendix);
+
+			if (compileLinkAndRun(src, fName, retType)) {
+				for (unsigned i = 0; i < linesToAppend.size(); ++i)
+					_lines.push_back(linesToAppend[i]);
+				}
+		}
+	}
 	_parser.reset();
 }


Provide some kind of feedback while running ?gc.

--- Console.cpp
+++ Console.cpp
@@ -500,7 +500,9 @@
                 } else if (data == "destroy") {
                     CYDestroyContext();
                 } else if (data == "gc") {
+                    *out_ << "collecting... " << std::flush;
                     CYGarbageCollect(CYGetJSContext());
+                    *out_ << "done." << std::endl;
                 } else if (data == "exit") {
                     return;
                 } else if (data == "expand") {


use stubs for yet-to-be-implemented non-windows translate infobars

BUG=31297
TEST=none.
Review URL: http://codereview.chromium.org/557064

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@37567 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- chrome/browser/translate/translate_infobars_delegates.cc
+++ chrome/browser/translate/translate_infobars_delegates.cc
@@ -177,6 +177,13 @@
     prefs_.RemoveSiteFromBlacklist(site_);
 }

+#if !defined(TOOLKIT_VIEWS)
+InfoBar* BeforeTranslateInfoBarDelegate::CreateInfoBar() {
+  NOTIMPLEMENTED();
+  return NULL;
+}
+#endif  // !TOOLKIT_VIEWS
+
 // AfterTranslateInfoBarDelegate: public: --------------------------------------

 AfterTranslateInfoBarDelegate::AfterTranslateInfoBarDelegate(
@@ -212,3 +219,10 @@
     prefs_.RemoveLanguagePairFromWhitelist(original_language(),
         target_language());
 }
+
+#if !defined(TOOLKIT_VIEWS)
+InfoBar* AfterTranslateInfoBarDelegate::CreateInfoBar() {
+  NOTIMPLEMENTED();
+  return NULL;
+}
+#endif  // !TOOLKIT_VIEWS


Fast user switcher: Add "(Supervised)" label for supervised users

BUG=463463

Review URL: https://codereview.chromium.org/1018003002

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#321184}

--- chrome/browser/ui/views/profiles/profile_chooser_view.cc
+++ chrome/browser/ui/views/profiles/profile_chooser_view.cc
@@ -1292,12 +1292,18 @@
     AvatarMenu::GetImageForMenuButton(
         item.profile_path, &item_icon, &is_rectangle);

+    base::string16 title = item.name;
+    if (item.supervised) {
+      title = l10n_util::GetStringFUTF16(IDS_SUPERVISED_USER_NEW_AVATAR_LABEL,
+                                         title);
+    }
+
     gfx::Image image = profiles::GetSizedAvatarIcon(
         item_icon, true, kSmallImageSide, kSmallImageSide);

     views::LabelButton* button = new BackgroundColorHoverButton(
         this,
-        item.name,
+        title,
         *image.ToImageSkia());
     open_other_profile_indexes_map_[button] = index;


Convert sandbox NOTIMPLEMENTED()s into a bug.

Review URL: http://codereview.chromium.org/27179

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@10410 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/renderer/renderer_main_platform_delegate_linux.cc
+++ chrome/renderer/renderer_main_platform_delegate_linux.cc
@@ -23,15 +23,18 @@
 }

 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) {
-  NOTIMPLEMENTED();
+  // We have no sandbox.
+  // http://code.google.com/p/chromium/issues/detail?id=8081
   return true;
 }

 bool RendererMainPlatformDelegate::EnableSandbox() {
-  NOTIMPLEMENTED();
+  // We have no sandbox.
+  // http://code.google.com/p/chromium/issues/detail?id=8081
   return true;
 }

 void RendererMainPlatformDelegate::RunSandboxTests() {
-  NOTIMPLEMENTED();
+  // We have no sandbox.
+  // http://code.google.com/p/chromium/issues/detail?id=8081
 }


Marking AutomatedUITestBase.CloseBrowserWindow as flaky on Win

BUG=96049
TEST=NONE

Review URL: http://codereview.chromium.org/7780007

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@100486 0039d316-1c4b-4281-b951-d872f2087c98

--- chrome/test/automated_ui_tests/automated_ui_test_test.cc
+++ chrome/test/automated_ui_tests/automated_ui_test_test.cc
@@ -182,7 +182,14 @@
   ASSERT_EQ(1, num_browser_windows);
 }

-TEST_F(AutomatedUITestBase, CloseBrowserWindow) {
+// Flaky, see http://crbug.com/96039.
+#if defined(OS_WIN)
+#define MAYBE_CloseBrowserWindow FLAKY_CloseBrowserWindow
+#else
+#define MAYBE_CloseBrowserWindow CloseBrowserWindow
+#endif
+
+TEST_F(AutomatedUITestBase, MAYBE_CloseBrowserWindow) {
   int tab_count;
   NewTab();
   ASSERT_TRUE(active_browser()->GetTabCount(&tab_count));


INTEGRATION: CWS dba205b (1.12.38); FILE MERGED 2006/08/09 19:52:36 fs 1.12.38.1: refactored the OColumnAlias class, in preparation of fixing #b6248060#

--- connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
+++ connectivity/source/drivers/mozab/MDatabaseMetaData.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: MDatabaseMetaData.cxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.14 $
  *
- *  last change: $Author: obo $ $Date: 2006-09-17 02:56:24 $
+ *  last change: $Author: ihi $ $Date: 2006-10-18 13:08:28 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -115,7 +115,6 @@
     ODatabaseMetaDataResultSet::ORow  aRow(19);
     aRows.clear();

-    const ::std::vector< ::rtl::OUString >& colNames = m_pConnection->getColumnAlias().getAlias();
     ::osl::MutexGuard aGuard( m_aMutex );

     ::std::vector< ::rtl::OUString > tables;
@@ -159,6 +158,8 @@
     // IS_NULLABLE
     aRow[18] = new ORowSetValueDecorator(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("YES")));

+    const OColumnAlias& colNames = m_pConnection->getColumnAlias();
+
     // Iterate over all tables
     for(size_t j = 0; j < tables.size(); j++ ) {
         if(match(tableNamePattern, tables[j],'\0')) {
@@ -168,13 +169,18 @@
             OSL_TRACE( "\t\tTableName = %s;\n",OUtoCStr( tables[j] ));

             // Iterate over all collumns in the table.
-            for ( size_t i = 0; i < colNames.size(); i++ ) {
-                if(match(columnNamePattern, colNames[i],'\0')) {
-                    OSL_TRACE( "\t\t\tColumnName = %s;\n",OUtoCStr( colNames[i] ));
+            for (   OColumnAlias::AliasMap::const_iterator compare = colNames.begin();
+                    compare != colNames.end();
+                    ++compare
+                )
+            {
+                if ( match( columnNamePattern, compare->first, '\0' ) )
+                {
+                    OSL_TRACE( "\t\t\tColumnName = %s;\n", OUtoCStr( compare->first ) );
                     // COLUMN_NAME
-                    aRow[4] = new ORowSetValueDecorator( colNames[i] );
+                    aRow[4] = new ORowSetValueDecorator( compare->first );
                     // ORDINAL_POSITION
-                    aRow[17] = new ORowSetValueDecorator(sal_Int32(i+1));
+                    aRow[17] = new ORowSetValueDecorator( static_cast< sal_Int32 >( compare->second.eProgrammaticNameIndex ) + 1 );
                     aRows.push_back(aRow);
                 }
             }


layers: Don't produce spurious validation errors for sample count

Previously we would emit a spurious validation error if the only
color or depth attachment references were VK_ATTACHMENT_UNUSED.

Signed-off-by: Chris Forbes <c3279c50043e18e9442c1ae071cafa0e7a4ca967@google.com>

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -2844,7 +2844,6 @@
         if (pCB->activeRenderPass) {
             const VkRenderPassCreateInfo *render_pass_info = pCB->activeRenderPass->pCreateInfo;
             const VkSubpassDescription *subpass_desc = &render_pass_info->pSubpasses[pCB->activeSubpass];
-            VkSampleCountFlagBits subpass_num_samples = VkSampleCountFlagBits(0);
             uint32_t i;

             const safe_VkPipelineColorBlendStateCreateInfo *color_blend_state = pPipeline->graphicsPipelineCI.pColorBlendState;
@@ -2860,6 +2859,8 @@
                                 reinterpret_cast<const uint64_t &>(pPipeline->pipeline));
             }

+            VkSampleCountFlagBits subpass_num_samples = VkSampleCountFlagBits(0);
+
             for (i = 0; i < subpass_desc->colorAttachmentCount; i++) {
                 VkSampleCountFlagBits samples;

@@ -2874,6 +2875,7 @@
                     break;
                 }
             }
+
             if ((subpass_desc->pDepthStencilAttachment != NULL) &&
                 (subpass_desc->pDepthStencilAttachment->attachment != VK_ATTACHMENT_UNUSED)) {
                 const VkSampleCountFlagBits samples =
@@ -2884,8 +2886,7 @@
                     subpass_num_samples = static_cast<VkSampleCountFlagBits>(-1);
             }

-            if (((subpass_desc->colorAttachmentCount > 0) || (subpass_desc->pDepthStencilAttachment != NULL)) &&
-                (pso_num_samples != subpass_num_samples)) {
+            if (subpass_num_samples && pso_num_samples != subpass_num_samples) {
                 skip_call |=
                         log_msg(my_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
                                 reinterpret_cast<const uint64_t &>(pPipeline->pipeline), __LINE__, DRAWSTATE_NUM_SAMPLES_MISMATCH, "DS",


add virtual destructor

add virtual destructor

--- include/samplog/Api.hpp
+++ include/samplog/Api.hpp
@@ -25,6 +25,8 @@
 				std::vector<AmxFuncCallInfo> &dest) = 0;

 			virtual samplog::ILogger *CreateLogger(const char *module) = 0;
+
+			virtual ~IApi() { }
 		};
 	}
 }


Delete DIVNINE.cpp

Delete DIVNINE.cpp


COMP: Fixed warning

COMP: Fixed warning

--- Parallel/vtkCommunicator.cxx
+++ Parallel/vtkCommunicator.cxx
@@ -28,7 +28,7 @@
 #include "vtkUnsignedCharArray.h"
 #include "vtkUnsignedLongArray.h"

-vtkCxxRevisionMacro(vtkCommunicator, "1.25");
+vtkCxxRevisionMacro(vtkCommunicator, "1.26");

 template <class T>
 int SendDataArray(T* data, int length, int handle, int tag, vtkCommunicator *self)
@@ -502,7 +502,6 @@

 int vtkCommunicator::ReadDataSet(vtkDataSet *object)
 {
-  vtkDataSet *output;
   vtkDataSetReader *reader = vtkDataSetReader::New();

   if (this->MarshalString == NULL || this->MarshalStringLength <= 0)


layers:Refactor CmdDrawIndirect() to use pre/post

Refactor CmdDrawIndirect() to use pre/post pattern and helper functions
for DrawType validate and update. There's a bit of extra validation and
state update that goes along with the buffer passed to this function vs
the Draw & DrawIndexed versions.

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -8134,37 +8134,48 @@
     }
 }

+static bool PreCallValidateCmdDrawIndirect(
+    layer_data *dev_data, VkCommandBuffer cmd_buffer, VkBuffer buffer, bool indexed, VkPipelineBindPoint bind_point,
+    GLOBAL_CB_NODE **cb_state, BUFFER_STATE **buffer_state,
+    vector<std::tuple<cvdescriptorset::DescriptorSet *, std::map<uint32_t, descriptor_req>, std::vector<uint32_t> const *>>
+        *active_set_bindings_pairs,
+    std::unordered_set<uint32_t> *active_bindings, const char *caller) {
+    bool skip = ValidateCmdDrawType(dev_data, cmd_buffer, indexed, bind_point, CMD_DRAWINDIRECT, cb_state,
+                                    active_set_bindings_pairs, active_bindings, caller, VALIDATION_ERROR_01381);
+    *buffer_state = getBufferState(dev_data, buffer);
+    skip |= ValidateMemoryIsBoundToBuffer(dev_data, *buffer_state, caller);
+    return skip;
+}
+
+static void PostCallRecordCmdDrawIndirect(
+    layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, BUFFER_STATE *buffer_state,
+    vector<std::tuple<cvdescriptorset::DescriptorSet *, std::map<uint32_t, descriptor_req>, std::vector<uint32_t> const *>>
+        *active_set_bindings_pairs,
+    std::unordered_set<uint32_t> *active_bindings) {
+    UpdateStateCmdDrawType(dev_data, cb_state, bind_point, CMD_DRAWINDIRECT, DRAW_INDIRECT, active_set_bindings_pairs,
+                           active_bindings);
+    AddCommandBufferBindingBuffer(dev_data, cb_state, buffer_state);
+}
+
 VKAPI_ATTR void VKAPI_CALL
 CmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count, uint32_t stride) {
     layer_data *dev_data = get_my_data_ptr(get_dispatch_key(commandBuffer), layer_data_map);
     vector<std::tuple<cvdescriptorset::DescriptorSet *, std::map<uint32_t, descriptor_req>, std::vector<uint32_t> const *>>
         active_set_bindings_pairs;
     std::unordered_set<uint32_t> active_bindings;
-    bool skip_call = false;
+    GLOBAL_CB_NODE *cb_state = nullptr;
+    BUFFER_STATE *buffer_state = nullptr;
     std::unique_lock<std::mutex> lock(global_lock);
-
-    auto cb_node = getCBNode(dev_data, commandBuffer);
-    auto buffer_state = getBufferState(dev_data, buffer);
-    if (cb_node && buffer_state) {
-        skip_call |= ValidateMemoryIsBoundToBuffer(dev_data, buffer_state, "vkCmdDrawIndirect()");
-        AddCommandBufferBindingBuffer(dev_data, cb_node, buffer_state);
-        skip_call |= ValidateCmd(dev_data, cb_node, CMD_DRAWINDIRECT, "vkCmdDrawIndirect()");
-        UpdateCmdBufferLastCmd(dev_data, cb_node, CMD_DRAWINDIRECT);
-        cb_node->drawCount[DRAW_INDIRECT]++;
-        skip_call |= ValidateDrawState(dev_data, cb_node, false, VK_PIPELINE_BIND_POINT_GRAPHICS, &active_set_bindings_pairs,
-                                       &active_bindings, "vkCmdDrawIndirect");
-        UpdateDrawState(dev_data, cb_node, VK_PIPELINE_BIND_POINT_GRAPHICS, &active_set_bindings_pairs, &active_bindings);
-        MarkStoreImagesAndBuffersAsWritten(dev_data, cb_node);
-        if (!skip_call) {
-            updateResourceTrackingOnDraw(cb_node);
-        }
-        skip_call |= outsideRenderPass(dev_data, cb_node, "vkCmdDrawIndirect()", VALIDATION_ERROR_01381);
-    } else {
-        assert(0);
-    }
+    bool skip = PreCallValidateCmdDrawIndirect(dev_data, commandBuffer, buffer, true, VK_PIPELINE_BIND_POINT_GRAPHICS, &cb_state,
+                                               &buffer_state, &active_set_bindings_pairs, &active_bindings, "vkCmdDrawIndirect()");
     lock.unlock();
-    if (!skip_call)
+    if (!skip) {
         dev_data->dispatch_table.CmdDrawIndirect(commandBuffer, buffer, offset, count, stride);
+        lock.lock();
+        PostCallRecordCmdDrawIndirect(dev_data, cb_state, VK_PIPELINE_BIND_POINT_GRAPHICS, buffer_state, &active_set_bindings_pairs,
+                                      &active_bindings);
+        lock.unlock();
+    }
 }

 VKAPI_ATTR void VKAPI_CALL
@@ -8184,7 +8195,7 @@
         skip_call |= ValidateCmd(dev_data, cb_node, CMD_DRAWINDEXEDINDIRECT, "vkCmdDrawIndexedIndirect()");
         UpdateCmdBufferLastCmd(dev_data, cb_node, CMD_DRAWINDEXEDINDIRECT);
         cb_node->drawCount[DRAW_INDEXED_INDIRECT]++;
-        skip_call |= ValidateDrawState(dev_data, cb_node, true, VK_PIPELINE_BIND_POINT_GRAPHICS, &active_set_bindings_pairs,
+        skip_call |= ValidateDrawState(dev_data, cb_node, false, VK_PIPELINE_BIND_POINT_GRAPHICS, &active_set_bindings_pairs,
                                        &active_bindings, "vkCmdDrawIndexedIndirect");
         UpdateDrawState(dev_data, cb_node, VK_PIPELINE_BIND_POINT_GRAPHICS, &active_set_bindings_pairs, &active_bindings);
         MarkStoreImagesAndBuffersAsWritten(dev_data, cb_node);


Use sz in Fixed::List

Use sz in Fixed::List

--- Fixed.hpp
+++ Fixed.hpp
@@ -157,21 +157,16 @@
     Node *tail;
     Stack<size_t, cap> unused;
     std::array<Node, cap> nodes;
+    size_t sz;
 public:
     List()
     {
         clear();
     }
-    List(const List<A, cap>& d)
-    : head(0)
-    , sz(d.sz)
-    {
-        for (auto i = 0; i < sz; i++) {
-            arr[i] = d.arr[i];
-        }
-    }
     void clear() {
         head = nullptr;
+        tail = nullptr;
+        sz = 0;
         unused.clear();
         auto i = 0;
         while (!unused.full()) {
@@ -180,7 +175,8 @@
         }
     }
     void push_front(A a) {
-        assert(size() < cap);
+        assert(sz < cap);
+        ++sz;
         auto idx = unused.back();
         if (!head) {
             head = &nodes[idx];
@@ -196,7 +192,8 @@
         *head = Node(a, idx);
     }
     void pop_front() {
-        assert(size() > 0);
+        assert(sz > 0);
+        --sz;
         unused.push_back(head->idx);
         if (head == tail) {
             head = nullptr;
@@ -207,7 +204,8 @@
         head->prev = nullptr;
     }
     void push_back(A a) {
-        assert(size() < cap);
+        assert(sz < cap);
+        ++sz;
         auto idx = unused.back();
         if (!head) {
             head = &nodes[idx];
@@ -223,7 +221,8 @@
         *head = Node(a, idx);
     }
     void pop_back() {
-        assert(size() > 0);
+        assert(sz > 0);
+        --sz;
         unused.push_back(tail->idx);
         if (head == tail) {
             head = nullptr;
@@ -234,7 +233,7 @@
         tail->next = nullptr;
     }
     A& at(size_t idx) {
-        if (idx >= 0 && idx < size()) {
+        if (idx >= 0 && idx < sz) {
             throw std::out_of_range("Out of range, at");
         }
         return get(idx);
@@ -246,7 +245,7 @@
     A& operator[](size_t idx) { return get(idx); }
     const A& operator[](size_t idx) const { return get(idx); }
     A& front() {
-        assert(size() > 0);
+        assert(sz > 0);
         return head->value;
     }
     const A& front() const {
@@ -254,7 +253,7 @@
         return val;
     }
     A& back() {
-        assert(size() > 0);
+        assert(sz > 0);
         return tail->value;
     }
     const A& back() const {
@@ -262,19 +261,19 @@
         return val;
     }
     size_t capacity() const { return cap; }
-    size_t size() const { return cap - unused.size(); }
-    bool empty() const { return unused.size() == cap; }
-    bool full() const { return unused.size() == 0; }
+    size_t size() const { return sz; }
+    bool empty() const { return sz == 0; }
+    bool full() const { return sz == cap; }
 private:
     A& get(size_t idx) {
-        assert(idx >= 0 && idx < size());
-        if (idx < size() / 2) {
+        assert(idx >= 0 && idx < sz);
+        if (idx < sz / 2) {
             auto node = head;
             for (auto i = 0; i < idx; node = node->next, ++i) {}
             return node->value;
         } else {
             auto node = tail;
-            for (auto i = size() - 1; i > idx; node = node->prev, --i) {}
+            for (auto i = sz - 1; i > idx; node = node->prev, --i) {}
             return node->value;
         }
     }


more casts to std::streamsize to fix build warnings in windows

--- include/xtensor/xio.hpp
+++ include/xtensor/xio.hpp
@@ -112,7 +112,7 @@

                     size_type i = 0;
                     size_type elems_on_line = 0;
-                    size_type line_lim = std::floor(line_width / (element_width + 2));
+                    size_type line_lim = (size_type) std::floor(line_width / (element_width + 2));

                     out << '{';
                     for (;i != e.shape()[0] - 1; ++i)
@@ -245,7 +245,7 @@
                 else
                 {
                     // 3 => sign and dot and + 1 (from calculation for exponent)
-                    m_width = (std::streamsize) 3 + std::log10(std::floor(m_max)) + m_precision;
+                    m_width = 3 + (std::streamsize) std::log10(std::floor(m_max)) + m_precision;
                 }
                 if (!m_required_precision)
                 {
@@ -352,14 +352,14 @@
             using cache_type = std::vector<value_type>;
             using cache_iterator = typename cache_type::const_iterator;

-            printer(int)
+            printer(std::streamsize)
             {
             }

             void init()
             {
                 m_it = m_cache.cbegin();
-                m_width = (std::streamsize) 1 + std::log10(m_max) + m_sign;
+                m_width = 1 + (std::streamsize) std::log10(m_max) + m_sign;
             }

             std::ostream& print_next(std::ostream& out)
@@ -405,7 +405,7 @@
             using cache_type = std::vector<bool>;
             using cache_iterator = typename cache_type::const_iterator;

-            printer(int)
+            printer(std::streamsize)
             {
             }

@@ -513,7 +513,7 @@
             using cache_type = std::vector<std::string>;
             using cache_iterator = typename cache_type::const_iterator;

-            printer(int)
+            printer(std::streamsize)
             {
             }

@@ -595,7 +595,7 @@
             lim = print_options::print_options().edge_items;
         }

-        int temp_precision = out.precision();
+        std::streamsize temp_precision = out.precision();
         if (print_options::print_options().precision != -1)
         {
             out << std::setprecision(print_options::print_options().precision);


layers:Refactor DestroySemaphore

layers:Refactor DestroySemaphore

Refactor DestroySemaphore() to use Pre/Post pattern.

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -5369,21 +5369,31 @@
     }
 }

+static bool PreCallValidateDestroySemaphore(layer_data *dev_data, VkSemaphore semaphore, SEMAPHORE_NODE **sema_node,
+                                            VK_OBJECT *obj_struct) {
+    *sema_node = getSemaphoreNode(dev_data, semaphore);
+    *obj_struct = {reinterpret_cast<uint64_t &>(semaphore), VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT};
+    bool skip = false;
+    if (*sema_node) {
+        skip |= ValidateObjectNotInUse(dev_data, *sema_node, *obj_struct, VALIDATION_ERROR_00199);
+    }
+    return skip;
+}
+
+static void PostCallRecordDestroySemaphore(layer_data *dev_data, VkSemaphore sema) { dev_data->semaphoreMap.erase(sema); }
+
 VKAPI_ATTR void VKAPI_CALL
 DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks *pAllocator) {
     layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map);
-    bool skip = false;
+    SEMAPHORE_NODE *sema_node;
+    VK_OBJECT obj_struct;
     std::unique_lock<std::mutex> lock(global_lock);
-    auto sema_node = getSemaphoreNode(dev_data, semaphore);
-    if (sema_node) {
-        skip |= ValidateObjectNotInUse(dev_data, sema_node,
-                                       {reinterpret_cast<uint64_t &>(semaphore), VK_DEBUG_REPORT_OBJECT_TYPE_SEMAPHORE_EXT},
-                                       VALIDATION_ERROR_00199);
-    }
+    bool skip = PreCallValidateDestroySemaphore(dev_data, semaphore, &sema_node, &obj_struct);
     if (!skip) {
-        dev_data->semaphoreMap.erase(semaphore);
         lock.unlock();
         dev_data->dispatch_table.DestroySemaphore(device, semaphore, pAllocator);
+        lock.lock();
+        PostCallRecordDestroySemaphore(dev_data, semaphore);
     }
 }


TRIV: Prefer style of placing public items at top of class def

--- domains/integrator_chains/dynamaestro/src/main.cpp
+++ domains/integrator_chains/dynamaestro/src/main.cpp
@@ -44,14 +44,6 @@
 */
 /** \ingroup integrator_chains */
 class TrajectoryGenerator {
-private:
-	Eigen::VectorXd X;
-	double t;  // Current time
-	int highest_order_deriv;
-	int numdim_output;
-
-	Eigen::VectorXd Xinit;
-
 public:
 	TrajectoryGenerator( int numdim_output, int highest_order_deriv );

@@ -78,6 +70,14 @@
 	/* Access to full, current state vector */
 	double getState( int i ) const
 		{ return X[i]; }
+
+private:
+	Eigen::VectorXd X;
+	double t;  // Current time
+	int highest_order_deriv;
+	int numdim_output;
+
+	Eigen::VectorXd Xinit;
 };

 TrajectoryGenerator::TrajectoryGenerator( int numdim_output, int highest_order_deriv )
@@ -136,24 +136,6 @@

 /** \ingroup integrator_chains */
 class TGThread {
-private:
-	boost::mutex mtx_;
-	bool fresh_input;
-	Eigen::VectorXd U;
-
-	Problem *probinstance;
-	Labeler labeler;
-
-	enum DMMode { ready, waiting, running, paused, resetting, restarting };
-	DMMode dmmode;
-
-	ros::NodeHandle &nh_;
-	ros::ServiceServer mode_srv;
-	ros::Publisher problemJSONpub;
-	ros::Publisher statepub;
-	ros::Publisher loutpub;
-	ros::Subscriber inputsub;
-
 public:
 	TGThread( ros::NodeHandle &nh );
 	~TGThread();
@@ -162,6 +144,24 @@
 					   dynamaestro::DMMode::Response &res );
 	void run();
 	void pubstate( const TrajectoryGenerator &tg, Eigen::VectorXd &Y );
+
+private:
+	boost::mutex mtx_;
+	bool fresh_input;
+	Eigen::VectorXd U;
+
+	Problem *probinstance;
+	Labeler labeler;
+
+	enum DMMode { ready, waiting, running, paused, resetting, restarting };
+	DMMode dmmode;
+
+	ros::NodeHandle &nh_;
+	ros::ServiceServer mode_srv;
+	ros::Publisher problemJSONpub;
+	ros::Publisher statepub;
+	ros::Publisher loutpub;
+	ros::Subscriber inputsub;
 };

 TGThread::TGThread( ros::NodeHandle &nh )


put in a check to force reexecution if request exact extent is not met

--- Filtering/vtkDataObject.cxx
+++ Filtering/vtkDataObject.cxx
@@ -28,7 +28,7 @@
 #include "vtkInformationIntegerVectorKey.h"
 #include "vtkInformationStringKey.h"

-vtkCxxRevisionMacro(vtkDataObject, "1.1");
+vtkCxxRevisionMacro(vtkDataObject, "1.2");
 vtkStandardNewMacro(vtkDataObject);

 vtkCxxSetObjectMacro(vtkDataObject,Information,vtkInformation);
@@ -692,6 +692,18 @@
         {
         return 1;
         }
+      if (   this->RequestExactExtent )
+        {
+        if ( this->UpdateExtent[0] != extent[0] ||
+             this->UpdateExtent[1] != extent[1] ||
+             this->UpdateExtent[2] != extent[2] ||
+             this->UpdateExtent[3] != extent[3] ||
+             this->UpdateExtent[4] != extent[4] ||
+             this->UpdateExtent[5] != extent[5] )
+          {
+          return 1;
+          }
+        }
       } break;

     // We should never have this case occur


layers: check for both TE and TC, not just TC

--- layers/core_validation.cpp
+++ layers/core_validation.cpp
@@ -2860,15 +2860,15 @@
                     "Invalid Pipeline CreateInfo State: Vertex Shader required. %s", validation_error_map[VALIDATION_ERROR_00532]);
     }
     // Either both or neither TC/TE shaders should be defined
-    if ((pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) &&
-        !(pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)) {
+    bool has_control = (pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) != 0;
+    bool has_eval = (pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) != 0;
+    if (has_control && !has_eval) {
         skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
                         reinterpret_cast<uint64_t &>(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_00534, "DS",
                         "Invalid Pipeline CreateInfo State: TE and TC shaders must be included or excluded as a pair. %s",
                         validation_error_map[VALIDATION_ERROR_00534]);
     }
-    if (!(pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) &&
-        (pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT)) {
+    if (!has_control && has_eval) {
         skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
                         reinterpret_cast<uint64_t &>(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_00535, "DS",
                         "Invalid Pipeline CreateInfo State: TE and TC shaders must be included or excluded as a pair. %s",
@@ -2883,7 +2883,7 @@
     }
     // VK_PRIMITIVE_TOPOLOGY_PATCH_LIST primitive topology is only valid for tessellation pipelines.
     // Mismatching primitive topology and tessellation fails graphics pipeline creation.
-    if (pPipeline->active_shaders & (VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT | VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) &&
+    if (has_control && has_eval &&
         (!pPipeline->graphicsPipelineCI.pInputAssemblyState ||
          pPipeline->graphicsPipelineCI.pInputAssemblyState->topology != VK_PRIMITIVE_TOPOLOGY_PATCH_LIST)) {
         skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
@@ -2895,7 +2895,7 @@
     }
     if (pPipeline->graphicsPipelineCI.pInputAssemblyState &&
         pPipeline->graphicsPipelineCI.pInputAssemblyState->topology == VK_PRIMITIVE_TOPOLOGY_PATCH_LIST) {
-        if (~pPipeline->active_shaders & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) {
+        if (!has_control || !has_eval) {
             skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_EXT,
                             reinterpret_cast<uint64_t &>(pPipeline->pipeline), __LINE__, VALIDATION_ERROR_02100, "DS",
                             "Invalid Pipeline CreateInfo State: "


INTEGRATION: CWS pchfix02 (1.10.12); FILE MERGED 2006/09/01 17:24:07 kaib 1.10.12.1: #i68856# Added header markers and pch files

--- dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: ComponentDefinition.cxx,v $
  *
- *  $Revision: 1.10 $
- *
- *  last change: $Author: ihi $ $Date: 2006-08-04 13:56:18 $
+ *  $Revision: 1.11 $
+ *
+ *  last change: $Author: obo $ $Date: 2006-09-17 06:37:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -32,6 +32,9 @@
  *    MA  02111-1307  USA
  *
  ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"

 #ifndef DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
 #include "ComponentDefinition.hxx"


ovda: add the check for omx_indexconfigcommonscale event.

If the SAR of the video is different than the actual
resolution, omx video decoder sends a PortSettingsChanged
event.

Review URL: http://codereview.chromium.org/7527002

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@95265 0039d316-1c4b-4281-b951-d872f2087c98

--- content/common/gpu/media/omx_video_decode_accelerator.cc
+++ content/common/gpu/media/omx_video_decode_accelerator.cc
@@ -916,6 +916,9 @@
       } else if (data1 == output_port_ &&
                  data2 == OMX_IndexConfigCommonOutputCrop) {
         // TODO(vjain): Handle video crop rect.
+      } else if (data1 == output_port_ &&
+                 data2 == OMX_IndexConfigCommonScale) {
+        // TODO(ashokm@nvidia.com): Handle video SAR change.
       } else {
         RETURN_ON_FAILURE(false,
                           "Unexpected EventPortSettingsChanged: "


Make Blake3 the default hash algorithm instead of SHA-1

--- DirHash.cpp
+++ DirHash.cpp
@@ -375,7 +375,7 @@
 	Streebog() : Hash()
 	{
 		STREEBOG_init(&m_ctx);
-}
+	}

 	void Init() { STREEBOG_init(&m_ctx); }
 	void Update(LPCBYTE pbData, size_t dwLength) { STREEBOG_add(&m_ctx, pbData, dwLength); }
@@ -1077,7 +1077,7 @@
 		TEXT("  DirHash.exe DirectoryOrFilePath [HashAlgo] [-t ResultFileName] [-mscrypto] [-sum] [-verify FileName] [-clip] [-lowercase] [-overwrite]  [-quiet] [-nowait] [-hashnames] [-skipError] [-nologo] [-exclude pattern1] [-exclude pattern2]\n")
 		TEXT("  DirHash.exe -benchmark [HashAlgo | All] [-t ResultFileName] [-mscrypto] [-clip] [-overwrite]  [-quiet] [-nowait] [-nologo]\n")
 		TEXT("\n")
-		TEXT("  Possible values for HashAlgo (not case sensitive, default is SHA1):\n"));
+		TEXT("  Possible values for HashAlgo (not case sensitive, default is Blake3):\n"));
 	   _tprintf(_T(" "));
 		std::vector<std::wstring> algos = Hash::GetSupportedHashIds();
 		for (size_t i = 0; i < algos.size(); i++)
@@ -1228,7 +1228,7 @@

 void LoadDefaults(wstring& hashAlgoToUse, bool& bQuiet, bool& bDontWait, bool& bShowProgress, bool& bCopyToClipboard, bool& bIncludeNames, bool& bStripNames, bool& bLowerCase, bool& bUseMsCrypto, bool& bSkipError, bool& bNoLogo)
 {
-	hashAlgoToUse = L"SHA1";
+	hashAlgoToUse = L"Blake3";
 	bUseMsCrypto = false;
 	bDontWait = false;
 	bIncludeNames = false;
@@ -1252,7 +1252,7 @@
 			StringCbCatW(szInitPath, sizeof(szInitPath), L"DirHash.ini");

 			WCHAR szValue[128];
-			if (GetPrivateProfileStringW(L"Defaults", L"Hash", L"SHA1", szValue, ARRAYSIZE(szValue), szInitPath) && Hash::IsHashId (szValue))
+			if (GetPrivateProfileStringW(L"Defaults", L"Hash", L"Blake3", szValue, ARRAYSIZE(szValue), szInitPath) && Hash::IsHashId (szValue))
 			{
 				hashAlgoToUse = szValue;
 			}
@@ -1598,7 +1598,7 @@
 	bool bSumMode = false;
 	bool bVerifyMode = false;
 	list<wstring> excludeSpecList;
-	wstring hashAlgoToUse = L"SHA1";
+	wstring hashAlgoToUse = L"Blake3";
 	bool bBenchmarkOp = false;
 	map < wstring, HashResultEntry> digestsList;
 	map < int, ByteArray> rawDigestsList;