Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: src/value-serializer.cc

Issue 2839903003: ValueSerializer: Add a warning about making wire format changes near branch. (Closed)
Patch Set: update wording Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/value-serializer.h" 5 #include "src/value-serializer.h"
6 6
7 #include <type_traits> 7 #include <type_traits>
8 8
9 #include "src/base/logging.h" 9 #include "src/base/logging.h"
10 #include "src/conversions.h" 10 #include "src/conversions.h"
(...skipping 11 matching lines...) Expand all
22 22
23 namespace v8 { 23 namespace v8 {
24 namespace internal { 24 namespace internal {
25 25
26 // Version 9: (imported from Blink) 26 // Version 9: (imported from Blink)
27 // Version 10: one-byte (Latin-1) strings 27 // Version 10: one-byte (Latin-1) strings
28 // Version 11: properly separate undefined from the hole in arrays 28 // Version 11: properly separate undefined from the hole in arrays
29 // Version 12: regexp and string objects share normal string encoding 29 // Version 12: regexp and string objects share normal string encoding
30 // Version 13: host objects have an explicit tag (rather than handling all 30 // Version 13: host objects have an explicit tag (rather than handling all
31 // unknown tags) 31 // unknown tags)
32 //
33 // WARNING: Increasing this value is a change which cannot safely be rolled
34 // back without breaking compatibility with data stored on disk. It is
35 // strongly recommended that you do not make such changes near a release
36 // milestone branch point.
37 //
38 // Recent changes are routinely reverted in preparation for branch, and this
39 // has been the cause of at least one bug in the past.
32 static const uint32_t kLatestVersion = 13; 40 static const uint32_t kLatestVersion = 13;
33 41
34 static const int kPretenureThreshold = 100 * KB; 42 static const int kPretenureThreshold = 100 * KB;
35 43
36 template <typename T> 44 template <typename T>
37 static size_t BytesNeededForVarint(T value) { 45 static size_t BytesNeededForVarint(T value) {
38 static_assert(std::is_integral<T>::value && std::is_unsigned<T>::value, 46 static_assert(std::is_integral<T>::value && std::is_unsigned<T>::value,
39 "Only unsigned integer types can be written as varints."); 47 "Only unsigned integer types can be written as varints.");
40 size_t result = 0; 48 size_t result = 0;
41 do { 49 do {
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 if (stack.size() != 1) { 2028 if (stack.size() != 1) {
2021 isolate_->Throw(*isolate_->factory()->NewError( 2029 isolate_->Throw(*isolate_->factory()->NewError(
2022 MessageTemplate::kDataCloneDeserializationError)); 2030 MessageTemplate::kDataCloneDeserializationError));
2023 return MaybeHandle<Object>(); 2031 return MaybeHandle<Object>();
2024 } 2032 }
2025 return scope.CloseAndEscape(stack[0]); 2033 return scope.CloseAndEscape(stack[0]);
2026 } 2034 }
2027 2035
2028 } // namespace internal 2036 } // namespace internal
2029 } // namespace v8 2037 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698