Advertisement
Guest User

Untitled

a guest
Jan 26th, 2018
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 11.05 KB | None | 0 0
  1. diff --git i/base/threading/thread_restrictions.cc w/base/threading/thread_restrictions.cc
  2. index e7e1716e08..3ae4e04c48 100644
  3. --- i/base/threading/thread_restrictions.cc
  4. +++ w/base/threading/thread_restrictions.cc
  5. @@ -26,12 +26,7 @@ LazyInstance<ThreadLocalBoolean>::Leaky g_base_sync_primitives_disallowed =
  6.  }  // namespace
  7.  
  8.  void AssertBlockingAllowed() {
  9. -  DCHECK(!g_blocking_disallowed.Get().Get())
  10. -      << "Function marked as blocking was called from a scope that disallows "
  11. -         "blocking! If this task is running inside the TaskScheduler, it needs "
  12. -         "to have MayBlock() in its TaskTraits. Otherwise, consider making "
  13. -         "this blocking work asynchronous or, as a last resort, you may use "
  14. -         "ScopedAllowBlocking in a narrow scope.";
  15. +  return;
  16.  }
  17.  
  18.  void DisallowBlocking() {
  19. @@ -54,7 +49,6 @@ ScopedAllowBlocking::ScopedAllowBlocking()
  20.  }
  21.  
  22.  ScopedAllowBlocking::~ScopedAllowBlocking() {
  23. -  DCHECK(!g_blocking_disallowed.Get().Get());
  24.    g_blocking_disallowed.Get().Set(was_disallowed_);
  25.  }
  26.  
  27. @@ -64,14 +58,10 @@ void DisallowBaseSyncPrimitives() {
  28.  
  29.  ScopedAllowBaseSyncPrimitives::ScopedAllowBaseSyncPrimitives()
  30.      : was_disallowed_(g_base_sync_primitives_disallowed.Get().Get()) {
  31. -  DCHECK(!g_blocking_disallowed.Get().Get())
  32. -      << "To allow //base sync primitives in a scope where blocking is "
  33. -         "disallowed use ScopedAllowBaseSyncPrimitivesOutsideBlockingScope.";
  34.    g_base_sync_primitives_disallowed.Get().Set(false);
  35.  }
  36.  
  37.  ScopedAllowBaseSyncPrimitives::~ScopedAllowBaseSyncPrimitives() {
  38. -  DCHECK(!g_base_sync_primitives_disallowed.Get().Get());
  39.    g_base_sync_primitives_disallowed.Get().Set(was_disallowed_);
  40.  }
  41.  
  42. @@ -83,7 +73,6 @@ ScopedAllowBaseSyncPrimitivesOutsideBlockingScope::
  43.  
  44.  ScopedAllowBaseSyncPrimitivesOutsideBlockingScope::
  45.      ~ScopedAllowBaseSyncPrimitivesOutsideBlockingScope() {
  46. -  DCHECK(!g_base_sync_primitives_disallowed.Get().Get());
  47.    g_base_sync_primitives_disallowed.Get().Set(was_disallowed_);
  48.  }
  49.  
  50. @@ -95,19 +84,13 @@ ScopedAllowBaseSyncPrimitivesForTesting::
  51.  
  52.  ScopedAllowBaseSyncPrimitivesForTesting::
  53.      ~ScopedAllowBaseSyncPrimitivesForTesting() {
  54. -  DCHECK(!g_base_sync_primitives_disallowed.Get().Get());
  55.    g_base_sync_primitives_disallowed.Get().Set(was_disallowed_);
  56.  }
  57.  
  58.  namespace internal {
  59.  
  60.  void AssertBaseSyncPrimitivesAllowed() {
  61. -  DCHECK(!g_base_sync_primitives_disallowed.Get().Get())
  62. -      << "Waiting on a //base sync primitive is not allowed on this thread to "
  63. -         "prevent jank and deadlock. If waiting on a //base sync primitive is "
  64. -         "unavoidable, do it within the scope of a "
  65. -         "ScopedAllowBaseSyncPrimitives. If in a test, "
  66. -         "use ScopedAllowBaseSyncPrimitivesForTesting.";
  67. +    return;
  68.  }
  69.  
  70.  void ResetThreadRestrictionsForTesting() {
  71. diff --git i/build/config/compiler/compiler.gni w/build/config/compiler/compiler.gni
  72. index f8026b67a8..5c6085b9b2 100644
  73. --- i/build/config/compiler/compiler.gni
  74. +++ w/build/config/compiler/compiler.gni
  75. @@ -70,19 +70,19 @@ declare_args() {
  76.  
  77.    # Whether or not we should use position independent code.
  78.    use_pic = true
  79. +
  80. +  # Exclude unwind tables for official builds as unwinding can be done from
  81. +  # stack dumps produced by Crashpad at a later time "offline" in the crash
  82. +  # server. For unofficial (e.g. development) builds and non-Chrome branded
  83. +  # (e.g. Cronet which doesn't use Crashpad, crbug.com/479283) builds it's
  84. +  # useful to be able to unwind at runtime.
  85. +  exclude_unwind_tables =
  86. +      (is_chrome_branded && is_official_build) ||
  87. +      (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia)
  88.  }
  89.  
  90.  assert(!is_cfi || use_thin_lto, "CFI requires ThinLTO")
  91.  
  92. -# Exclude unwind tables for official builds as unwinding can be done from stack
  93. -# dumps produced by Crashpad at a later time "offline" in the crash server.
  94. -# For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
  95. -# which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
  96. -# to unwind at runtime.
  97. -exclude_unwind_tables =
  98. -    (is_chrome_branded && is_official_build) ||
  99. -    (is_chromecast && !is_cast_desktop_build && !is_debug && !is_fuchsia)
  100. -
  101.  # If true, optimize for size. Does not affect windows builds.
  102.  # Linux & Mac favor speed over size.
  103.  # TODO(brettw) it's weird that Mac and desktop Linux are different. We should
  104. diff --git i/ui/gfx/linux/client_native_pixmap_dmabuf.cc w/ui/gfx/linux/client_native_pixmap_dmabuf.cc
  105. index 6611dcfef8..61354b2dd9 100644
  106. --- i/ui/gfx/linux/client_native_pixmap_dmabuf.cc
  107. +++ w/ui/gfx/linux/client_native_pixmap_dmabuf.cc
  108. @@ -17,9 +17,6 @@
  109.  #include "base/strings/stringprintf.h"
  110.  #include "base/trace_event/trace_event.h"
  111.  
  112. -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
  113. -#include <linux/dma-buf.h>
  114. -#else
  115.  #include <linux/types.h>
  116.  
  117.  struct dma_buf_sync {
  118. @@ -34,7 +31,6 @@ struct dma_buf_sync {
  119.  
  120.  #define DMA_BUF_BASE 'b'
  121.  #define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
  122. -#endif
  123.  
  124.  namespace gfx {
  125.  
  126. diff --git i/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h w/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
  127. index bd508956e5..4dc58bb711 100644
  128. --- i/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
  129. +++ w/third_party/WebKit/Source/platform/wtf/typed_arrays/ArrayBufferContents.h
  130. @@ -62,7 +62,7 @@ class WTF_EXPORT ArrayBufferContents {
  131.            allocation_length_(length),
  132.            data_(data),
  133.            data_length_(length),
  134. -          kind_(AllocationKind::kNormal),
  135. +          kind_(WTF::ArrayBufferContents::AllocationKind::kNormal),
  136.            deleter_(deleter) {}
  137.      DataHandle(void* allocation_base,
  138.                 size_t allocation_length,
  139. @@ -93,11 +93,11 @@ class WTF_EXPORT ArrayBufferContents {
  140.               reinterpret_cast<uintptr_t>(allocation_base_) +
  141.                   allocation_length_);
  142.        switch (kind_) {
  143. -        case AllocationKind::kNormal:
  144. +        case WTF::ArrayBufferContents::AllocationKind::kNormal:
  145.            DCHECK(deleter_);
  146.            deleter_(data_);
  147.            return;
  148. -        case AllocationKind::kReservation:
  149. +        case WTF::ArrayBufferContents::AllocationKind::kReservation:
  150.            ReleaseReservedMemory(allocation_base_, allocation_length_);
  151.            return;
  152.        }
  153. diff --git i/third_party/WebKit/Source/platform/wtf/text/TextCodec.h w/third_party/WebKit/Source/platform/wtf/text/TextCodec.h
  154. index 9c23de8d4a..f76d1e5718 100644
  155. --- i/third_party/WebKit/Source/platform/wtf/text/TextCodec.h
  156. +++ w/third_party/WebKit/Source/platform/wtf/text/TextCodec.h
  157. @@ -68,10 +68,6 @@ enum FlushBehavior {
  158.    kDataEOF
  159.  };
  160.  
  161. -static_assert(!kDoNotFlush, "DoNotFlush should be falsy");
  162. -static_assert(kFetchEOF, "FetchEOF should be truthy");
  163. -static_assert(kDataEOF, "DataEOF should be truthy");
  164. -
  165.  class WTF_EXPORT TextCodec {
  166.    USING_FAST_MALLOC(TextCodec);
  167.  
  168. diff --git i/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h w/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
  169. index 89d3313585..84b331cc06 100644
  170. --- i/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
  171. +++ w/third_party/WebKit/Source/platform/wtf/LinkedHashSet.h
  172. @@ -731,6 +731,8 @@ inline LinkedHashSet<T, U, V, W>& LinkedHashSet<T, U, V, W>::operator=(
  173.    return *this;
  174.  }
  175.  
  176. +inline void SwapAnchor(LinkedHashSetNodeBase& a, LinkedHashSetNodeBase& b);
  177. +
  178.  template <typename T, typename U, typename V, typename W>
  179.  inline void LinkedHashSet<T, U, V, W>::Swap(LinkedHashSet& other) {
  180.    impl_.swap(other.impl_);
  181. diff --git i/services/viz/public/cpp/compositing/quads_struct_traits.h w/services/viz/public/cpp/compositing/quads_struct_traits.h
  182. index c7b07abc33..cef4afafce 100644
  183. --- i/services/viz/public/cpp/compositing/quads_struct_traits.h
  184. +++ w/services/viz/public/cpp/compositing/quads_struct_traits.h
  185. @@ -308,7 +308,7 @@ struct StructTraits<viz::mojom::TextureQuadStateDataView, viz::DrawQuad> {
  186.    static base::span<const float> vertex_opacity(const viz::DrawQuad& input) {
  187.      const viz::TextureDrawQuad* quad =
  188.          viz::TextureDrawQuad::MaterialCast(&input);
  189. -    return quad->vertex_opacity;
  190. +    return base::make_span(quad->vertex_opacity);
  191.    }
  192.  
  193.    static bool y_flipped(const viz::DrawQuad& input) {
  194. diff --git i/services/viz/public/cpp/compositing/filter_operation_struct_traits.h w/services/viz/public/cpp/compositing/filter_operation_struct_traits.h
  195. index 4d66831256..0273d708fa 100644
  196. --- i/services/viz/public/cpp/compositing/filter_operation_struct_traits.h
  197. +++ w/services/viz/public/cpp/compositing/filter_operation_struct_traits.h
  198. @@ -138,7 +138,7 @@ struct StructTraits<viz::mojom::FilterOperationDataView, cc::FilterOperation> {
  199.    static base::span<const float> matrix(const cc::FilterOperation& operation) {
  200.      if (operation.type() != cc::FilterOperation::COLOR_MATRIX)
  201.        return base::span<const float>();
  202. -    return operation.matrix();
  203. +    return base::make_span(operation.matrix());
  204.    }
  205.  
  206.    static base::span<const gfx::Rect> shape(
  207. diff --git i/media/video/video_encode_accelerator.h w/media/video/video_encode_accelerator.h
  208. index 409e2a5fc3..2e00b82dc8 100644
  209. --- i/media/video/video_encode_accelerator.h
  210. +++ w/media/video/video_encode_accelerator.h
  211. @@ -161,7 +161,7 @@ class MEDIA_EXPORT VideoEncodeAccelerator {
  212.    // handed back to the client, and afterwards the |flush_callback| will be
  213.    // called. The FlushCallback takes a boolean argument: |true| indicates the
  214.    // flush is complete; |false| indicates the flush is cancelled due to errors
  215. -  // or destruction. The client should not invoke Flush() or Encode() while the\
  216. +  // or destruction. The client should not invoke Flush() or Encode() while the
  217.    // previous Flush() is not finished yet.
  218.    virtual void Flush(FlushCallback flush_callback);
  219.  
  220. diff --git i/media/base/decoder_buffer.h w/media/base/decoder_buffer.h
  221. index 0341e5784f..60ffba708b 100644
  222. --- i/media/base/decoder_buffer.h
  223. +++ w/media/base/decoder_buffer.h
  224. @@ -37,7 +37,7 @@ class MEDIA_EXPORT DecoderBuffer
  225.      : public base::RefCountedThreadSafe<DecoderBuffer> {
  226.   public:
  227.    enum {
  228. -    kPaddingSize = 32,
  229. +    kPaddingSize = 64,
  230.  #if defined(ARCH_CPU_ARM_FAMILY)
  231.      kAlignmentSize = 16
  232.  #else
  233. diff --git i/components/assist_ranker/ranker_example_util.cc w/components/assist_ranker/ranker_example_util.cc
  234. index 54d4dbd58f..867b4627d1 100644
  235. --- i/components/assist_ranker/ranker_example_util.cc
  236. +++ w/components/assist_ranker/ranker_example_util.cc
  237. @@ -2,6 +2,8 @@
  238.  // Use of this source code is governed by a BSD-style license that can be
  239.  // found in the LICENSE file.
  240.  
  241. +#include <cmath>
  242. +
  243.  #include "components/assist_ranker/ranker_example_util.h"
  244.  #include "base/bit_cast.h"
  245.  #include "base/format_macros.h"
  246. diff --git i/chrome/browser/vr/sample_queue.h w/chrome/browser/vr/sample_queue.h
  247. index c74f316f2e..48605c2035 100644
  248. --- i/chrome/browser/vr/sample_queue.h
  249. +++ w/chrome/browser/vr/sample_queue.h
  250. @@ -6,6 +6,7 @@
  251.  #define CHROME_BROWSER_VR_SAMPLE_QUEUE_H_
  252.  
  253.  #include <vector>
  254. +#include <cstdint>
  255.  
  256.  #include "base/macros.h"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement