1. 14 Feb, 2019 1 commit
    • Hannu Trey's avatar
      Re-detect the host time zone if requested by an embedder · f781f522
      Hannu Trey authored
      Add an enum argument to DateTimeConfigurationChangeNotification to
      control whether or not to redetect the host time zone. The default value
      kSkip doesn't cause redetecting so that callers do not need to change if
      they want the current behavior (e.g. Chromium).
      
      Note that the host time zone detection does not work when v8 is run
      inside a sandbox as in Chromium so that Chromium detects the host time
      zone outside the sandbox before calling
      DateTimeConfigurationChangeNotification. OTOH, other v8 embedders may
      find it more convenient for v8 to do the host time zone detection on
      their behalf. In that case, they can call the function with the new
      argument set to value kRedetect.
      
      Test:
      With PHP+V8Js on linux, execute:
      php -r '
        putenv("TZ=Europe/Helsinki");
        $v8 = new V8Js();
        $v8->executeString("print((new Date(0)).toString()+\"\\n\");");
        putenv("TZ=America/New_York");
        $v8->executeString("print((new Date(0)).toString()+\"\\n\");");'
      
      Result before modification:
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      
      Result after modification:
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      
      Result after V8JS is modified to use value kRedetect when calling
      
      Thu Jan 01 1970 02:00:00 GMT+0200 (Eastern European Standard Time)
      Wed Dec 31 1969 19:00:00 GMT-0500 (Eastern Standard Time)
      
      DateTimeConfigurationChangeNotification: 
      Change-Id: I005192dd42669a94f606a49baa9eafad3475b9fd
      Reviewed-on: https://chromium-review.googlesource.com/c/1449637Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarJungshik Shin <jshin@chromium.org>
      Commit-Queue: Jungshik Shin <jshin@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#59613}
      f781f522
  2. 13 Feb, 2019 1 commit
  3. 28 Jan, 2019 2 commits
  4. 22 Jan, 2019 1 commit
  5. 21 Jan, 2019 1 commit
    • Clemens Hammacher's avatar
      [platform] Allow to memory-map empty files · 6962334d
      Clemens Hammacher authored
      This current fails, since {mmap} fails with EINVAL for empty mappings.
      The destructor already has special handling for a {nullptr} mapping, so
      we can just use {nullptr} for empty files. We get a similar error on
      windows, and can fix it the same way.
      
      On order to make presubmit checks happy, we have to skip copyright
      checking and checking for terminating newlines for empty files.
      
      R=mlippautz@chromium.org
      
      Change-Id: I2b73da7ff6df72d8bdd40df1fff6422e0a46881e
      Reviewed-on: https://chromium-review.googlesource.com/c/1424861Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#58970}
      6962334d
  6. 18 Jan, 2019 1 commit
  7. 14 Jan, 2019 2 commits
  8. 07 Jan, 2019 1 commit
  9. 07 Dec, 2018 1 commit
  10. 20 Nov, 2018 1 commit
  11. 30 Oct, 2018 1 commit
  12. 25 Oct, 2018 1 commit
  13. 24 Oct, 2018 1 commit
  14. 23 Oct, 2018 2 commits
  15. 22 Oct, 2018 1 commit
  16. 18 Oct, 2018 1 commit
  17. 12 Oct, 2018 1 commit
  18. 01 Oct, 2018 1 commit
  19. 26 Sep, 2018 1 commit
  20. 19 Sep, 2018 1 commit
    • Clemens Hammacher's avatar
      [base] Remove OffsetFrom and AddressFrom · 60d6f7c2
      Clemens Hammacher authored
      Those two methods are spread over the code base, and their purpose is
      often not clear. Historically, they were used to turn pointers into
      integers in order to do computations on them. Today we have {Address}
      which is uintptr_t, so we can compute directly on that.
      
      This also makes the {RoundUp} and {RoundDown} macros only work on
      integral values (including {Address}).
      
      R=mlippautz@chromium.org
      
      Bug: v8:8015
      Change-Id: Ia98fb826793ee5d3a2a5b18c09c329d088443772
      Reviewed-on: https://chromium-review.googlesource.com/1233914Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
      Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#56048}
      60d6f7c2
  21. 14 Sep, 2018 1 commit
  22. 13 Sep, 2018 2 commits
  23. 05 Sep, 2018 1 commit
  24. 31 Aug, 2018 1 commit
  25. 30 Aug, 2018 1 commit
  26. 28 Aug, 2018 1 commit
  27. 23 Aug, 2018 1 commit
    • Bruce Dawson's avatar
      Use PAGE_TARGETS_INVALID when allocating code pages · 6930df0f
      Bruce Dawson authored
      PAGE_TARGETS_INVALID tells CFG (Control Flow Guard) to mark all
      addresses as invalid indirect branch targets. This makes exploits more
      difficult. The benefit is minor because most of the code in the Chrome
      process doesn't use the CFG checks, but this will close off a few
      weaknesses and is the direction we will want to go in eventually
      anyway (with specific targets or call sites opted-in to allowing
      calls, using SetProcessValidCallTargets).
      
      PAGE_TARGETS_INVALID may ultimately cause CFG to not allocate memory -
      that is implied by Windows Internals 7th Edition - and if that is
      implemented then this change will save some modest amount of memory.
      
      PAGE_TARGETS_INVALID was introduced in Windows 10 - according to
      Windows Internals Part 1 7th Edition - prior to that it will cause
      VirtualAlloc to fail.
      
      Bug: chromium:870054
      Change-Id: Ib1784fba37cc0ecb5fe5df595f1519531b3b3a20
      Reviewed-on: https://chromium-review.googlesource.com/1186025
      Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
      Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
      Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#55365}
      6930df0f
  28. 23 Jul, 2018 1 commit
  29. 12 Jul, 2018 1 commit
  30. 22 Jun, 2018 1 commit
  31. 06 Jun, 2018 1 commit
  32. 16 May, 2018 1 commit
    • Dan Elphick's avatar
      [heap] Start making ReadOnlySpace Pages relocatable · 7485b129
      Dan Elphick authored
      Adds Page::MakeHeaderRelocatable that clears pointers to objects
      outside the space. In this case relocatable means the entire page
      heading is position independent in memory, meaning it could be saved to
      disk and reloaded at a different memory location in a new process
      without there being any invalid pointers.
      
      Currently this only affects mutex_, locate_tracker_ and reservation_.
      
      Additionally makes VerifyHeap work when there's no mutex in a Page.
      
      This is just a stepping stone to making the Pages headers relocatable
      since heap_ and owner_ still point out of the Page.
      
      Also removes the empty ReadOnlySpace destructor.
      
      Bug: v8:7464
      Change-Id: Ife3c06575fa73a5818c4991fb9bec30a5f43901d
      Reviewed-on: https://chromium-review.googlesource.com/1054879Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
      Commit-Queue: Dan Elphick <delphick@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#53196}
      7485b129
  33. 18 Apr, 2018 1 commit
  34. 17 Apr, 2018 1 commit
  35. 06 Apr, 2018 2 commits