1. 09 Mar, 2020 1 commit
    • Dan Elphick's avatar
      [api] Create v8::String::NewFromLiteral that returns Local<String> · b097a8e5
      Dan Elphick authored
      String::NewFromLiteral is a templated function that takes a char[N]
      argument that can be used as an alternative to String::NewFromUtf8 and
      returns a Local<String> rather than a MaybeLocal<String> reducing the
      number of ToLocalChecked() or other checks.
      
      Since the string length is known at compile time, it can statically
      assert that the length is less than String::kMaxLength, which means that
      it can never fail at runtime.
      
      This also converts all found uses of NewFromUtf8 taking a string literal
      or a variable initialized from a string literal to use the new API. In
      some cases the types of stored string literals are changed from const
      char* to const char[] to ensure the size is retained.
      
      This API does introduce a small difference compared to NewFromUtf8. For
      a case like "abc\0def", NewFromUtf8 (using length -1 to infer length)
      would treat this as a 3 character string, whereas the new API will treat
      it as a 7 character string.
      
      As a drive-by fix, this also fixes all redundant uses of
      v8::NewStringType::kNormal when passed to any of the String::New*
      functions.
      
      Change-Id: Id96a44bc068d9c4eaa634aea688e024675a0e5b3
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2089935
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Reviewed-by: 's avatarMathias Bynens <mathias@chromium.org>
      Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
      Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66622}
      b097a8e5
  2. 24 May, 2019 1 commit
  3. 23 May, 2019 1 commit
  4. 22 May, 2019 1 commit
  5. 21 May, 2019 1 commit
  6. 17 May, 2019 1 commit
  7. 16 May, 2019 2 commits
  8. 30 Apr, 2019 1 commit
  9. 12 Nov, 2018 1 commit
  10. 14 Sep, 2018 1 commit
  11. 23 Aug, 2018 1 commit
  12. 23 Jul, 2018 1 commit
  13. 14 Apr, 2018 1 commit
    • Jakob Kummerow's avatar
      [ubsan] Change Address typedef to uintptr_t · 2459046c
      Jakob Kummerow authored
      The "Address" type is V8's general-purpose type for manipulating memory
      addresses. Per the C++ spec, pointer arithmetic and pointer comparisons
      are undefined behavior except within the same array; since we generally
      don't operate within a C++ array, our general-purpose type shouldn't be
      a pointer type.
      
      Bug: v8:3770
      Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng;master.tryserver.blink:linux_trusty_blink_rel
      Change-Id: Ib96016c24a0f18bcdba916dabd83e3f24a1b5779
      Reviewed-on: https://chromium-review.googlesource.com/988657
      Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#52601}
      2459046c
  14. 01 Mar, 2018 1 commit
  15. 24 Jan, 2018 1 commit
  16. 13 Dec, 2017 1 commit
  17. 13 Oct, 2017 1 commit
  18. 27 Apr, 2017 1 commit
  19. 07 Feb, 2017 1 commit
  20. 07 Sep, 2016 1 commit
  21. 12 May, 2016 1 commit
  22. 11 May, 2016 1 commit
  23. 06 May, 2016 1 commit
  24. 03 Feb, 2016 1 commit
  25. 09 Dec, 2015 1 commit
  26. 02 Nov, 2015 1 commit
  27. 28 Oct, 2015 1 commit
  28. 23 Oct, 2015 1 commit
  29. 28 May, 2015 1 commit
  30. 23 Apr, 2015 1 commit
  31. 15 Apr, 2015 2 commits
  32. 26 Mar, 2015 1 commit
  33. 25 Mar, 2015 2 commits
  34. 30 Jan, 2015 3 commits
  35. 10 Dec, 2014 1 commit