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

Unified Diff: runtime/vm/object.cc

Issue 11411204: When externalizing a string ensure that the basic tag bits are preserved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 15532)
+++ runtime/vm/object.cc (working copy)
@@ -10497,15 +10497,16 @@
intptr_t length,
void* peer,
Dart_PeerFinalizer cback) const {
+ NoGCScope no_gc;
ASSERT(array != NULL);
intptr_t str_length = this->Length();
ASSERT(length >= (str_length * this->CharSize()));
intptr_t class_id = raw()->GetClassId();
intptr_t used_size = 0;
intptr_t original_size = 0;
- uword tags = 0;
- NoGCScope no_gc;
+ uword tags = raw_ptr()->tags_;
+ ASSERT(!IsCanonical());
if (class_id == kOneByteStringCid) {
used_size = ExternalOneByteString::InstanceSize();
original_size = OneByteString::InstanceSize(str_length);
« runtime/vm/dart_api_impl.cc ('K') | « runtime/vm/dart_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698