1. 14 Apr, 2020 1 commit
  2. 03 Apr, 2020 1 commit
  3. 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
  4. 03 Mar, 2020 1 commit
  5. 24 Feb, 2020 1 commit
  6. 21 Feb, 2020 1 commit
  7. 19 Feb, 2020 3 commits
  8. 18 Feb, 2020 3 commits
  9. 11 Feb, 2020 1 commit
  10. 31 Jan, 2020 1 commit
    • Peter Marshall's avatar
      [tools] Add a VMState for Atomics.wait · e8ba5699
      Peter Marshall authored
      We will use this state in devtools via the inspector to indicate
      whether a thread is currently stuck polling in atomics.wait.
      
      VMState already distinguishes the important states we care about which
      are idle vs. running JS. We also want to know the state for
      atomics.wait(), which is commonly used in WebWorkers to poll the main
      page for work to do.
      
      This CL just adds and maintains the state and adds assertions in
      atomics tests. Another CL will emit inspector notifications when the
      VMState changes in a way that the inspector cares about.
      
      Re-flow comments as a drive-by cleanup.
      
      Bug: chromium:1025490
      Change-Id: I961051bfb846aa20454a56214310370ea8e47d1c
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2033168
      Commit-Queue: Peter Marshall <petermarshall@chromium.org>
      Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#66071}
      e8ba5699
  11. 16 Jan, 2020 1 commit
  12. 14 Jan, 2020 1 commit
  13. 13 Jan, 2020 1 commit
  14. 09 Jan, 2020 1 commit
  15. 19 Dec, 2019 1 commit
  16. 13 Dec, 2019 1 commit
  17. 29 Nov, 2019 1 commit
    • Sigurd Schneider's avatar
      [cctest] Check compilation result in v8_compile · 88f8d801
      Sigurd Schneider authored
      This CL introduces a CHECK in v8_compile that compilation succeedes.
      Previously, a failed compilation would lead to undefined behavior or
      a crash in CompileRun, because it would call Script::Run on a nullptr.
      This CL introduced v8_try_compile that returns a MaybeLocal and supports
      test-cases that want to ensure that a compilation fails.
      
      Bug: chromium:1014415
      Change-Id: I559190da6049f325e8650e4a29c6e387d8ff7af5
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1943154
      Auto-Submit: Sigurd Schneider <sigurds@chromium.org>
      Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
      Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#65266}
      88f8d801
  18. 28 Nov, 2019 1 commit
  19. 15 Nov, 2019 1 commit
  20. 06 Nov, 2019 1 commit
  21. 05 Nov, 2019 1 commit
    • Stefano Sanfilippo's avatar
      [compiler, api] Allow modifying codegen hook to block non-strings. · 6c0825aa
      Stefano Sanfilippo authored
      Instead of inferring allow_codegen from the state of MaybeLocal<String>, return it separately. This allows to distinguish "could not stringify this object" from "block execution of this object", regardless of whether the object is a string or not. Currently, the hook can trigger an EvalError only if the original source was a string.
      
      Modify the logic so that one of the three mechanisms (unconditional, non-modifying, modifying) decides alone. Before, if the non-modifying callback rejected a value, the value would be forwarded to the modifying callback, but the unconditional would not forward to the non-modifying callback. This introduces a more uniform behaviour where the three mechanisms act in decreasing priority.
      
      Change-Id: Iaaa9873227052653d714df65f31c4de914f48b7d
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1776082Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
      Reviewed-by: 's avatarDaniel Vogelheim <vogelheim@chromium.org>
      Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
      Commit-Queue: Stefano Sanfilippo <ssanfilippo@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#64763}
      6c0825aa
  22. 01 Nov, 2019 1 commit
  23. 30 Oct, 2019 1 commit
  24. 28 Oct, 2019 1 commit
  25. 23 Oct, 2019 1 commit
  26. 22 Oct, 2019 1 commit
  27. 21 Oct, 2019 1 commit
  28. 02 Oct, 2019 2 commits
  29. 27 Sep, 2019 1 commit
  30. 26 Sep, 2019 1 commit
  31. 16 Sep, 2019 1 commit
  32. 11 Sep, 2019 2 commits
    • Joshua Litt's avatar
      Revert "[top-level-await] Implement top-level-await in V8" · 93a29bdc
      Joshua Litt authored
      This reverts commit 591d1c9d.
      
      Reason for revert: breaks blink
      
      Original change's description:
      > [top-level-await] Implement top-level-await in V8
      > 
      > Implements AsyncModules in SourceTextModule. However, there is no
      > support in the parser or D8 for actually creating / resolving
      > AsyncModules. Also adds a flag '--top-level-await,' but the only
      > external facing change with the flag enabled is that Module::Evaluate
      > returns a promise.
      > 
      > Bug: v8:9344
      > Change-Id: Idc722efc1e2aa780d04bdb985bb7920ab969d34e
      > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728037
      > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
      > Reviewed-by: Georg Neis <neis@chromium.org>
      > Commit-Queue: Joshua Litt <joshualitt@chromium.org>
      > Cr-Commit-Position: refs/heads/master@{#63686}
      
      TBR=ulan@chromium.org,adamk@chromium.org,neis@chromium.org,joshualitt@chromium.org
      
      Change-Id: I6ceeb3a293a948af04bf200ab784ceb03386a3fd
      No-Presubmit: true
      No-Tree-Checks: true
      No-Try: true
      Bug: v8:9344
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1797656Reviewed-by: 's avatarZhi An Ng <zhin@chromium.org>
      Commit-Queue: Zhi An Ng <zhin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63692}
      93a29bdc
    • Joshua Litt's avatar
      [top-level-await] Implement top-level-await in V8 · 591d1c9d
      Joshua Litt authored
      Implements AsyncModules in SourceTextModule. However, there is no
      support in the parser or D8 for actually creating / resolving
      AsyncModules. Also adds a flag '--top-level-await,' but the only
      external facing change with the flag enabled is that Module::Evaluate
      returns a promise.
      
      Bug: v8:9344
      Change-Id: Idc722efc1e2aa780d04bdb985bb7920ab969d34e
      Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1728037Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
      Commit-Queue: Joshua Litt <joshualitt@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#63686}
      591d1c9d
  33. 10 Sep, 2019 1 commit
  34. 23 Aug, 2019 1 commit