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

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)
@@ -10498,14 +10498,16 @@
void* peer,
Dart_PeerFinalizer cback) const {
ASSERT(array != NULL);
+ NoGCScope no_gc;
cshapiro 2012/11/29 21:03:12 Why did this move? Was it scoped incorrectly befo
siva 2012/11/29 22:37:39 It needs to be before we access any of the stuff f
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_;
+ Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
+ ASSERT(!vm_isolate_heap->Contains(reinterpret_cast<uword>(raw_ptr())));
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