| commit | 46bc947e75ca3ad2004e835e2b2698b61aab102f | [log] [tgz] |
|---|---|---|
| author | Alexander Aprelev <aam@google.com> | Wed Sep 21 18:16:56 2022 +0000 |
| committer | Commit Bot <commit-bot@chromium.org> | Wed Sep 21 18:16:56 2022 +0000 |
| tree | e596d760af2b843c3b840bf55ef51a9c16e3e849 | |
| parent | 1bbb01211d32027cdab0acba6309c81689933ad6 [diff] |
[gardening] Fix gen_snapshot crash on msvc. Revert change to StringRAII which used to take reference, but was changed to take pointer in 2ead86ab9dcbfe9217af01670c7d93ede73381c9 Fixes https://github.com/dart-lang/sdk/issues/49978 TEST=ci Change-Id: I8d8b18e6e9ae3cd07427ee1b37df404d11dcb26e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260402 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Liam Appelbe <liama@google.com>
diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc index f7248d5..eb81d16 100644 --- a/runtime/bin/file_win.cc +++ b/runtime/bin/file_win.cc
@@ -323,9 +323,9 @@ class StringRAII { public: - explicit StringRAII(StringRAII* origin) { - own_ = origin->own_; - s_ = origin->release(); + explicit StringRAII(StringRAII& origin) { // NOLINT + own_ = origin.own_; + s_ = origin.release(); } explicit StringRAII(const char* s) : s_(s), own_(false) {}