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

Side by Side Diff: src/objects.cc

Issue 2858033: Fix Chromium issue 47824. (Closed)
Patch Set: Addressed review comments Created 10 years, 5 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 | « src/jsregexp.cc ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 cs->set_second(Heap::empty_string()); 671 cs->set_second(Heap::empty_string());
672 return result; 672 return result;
673 } 673 }
674 default: 674 default:
675 return this; 675 return this;
676 } 676 }
677 } 677 }
678 678
679 679
680 bool String::MakeExternal(v8::String::ExternalStringResource* resource) { 680 bool String::MakeExternal(v8::String::ExternalStringResource* resource) {
681 // Externalizing twice leaks the external resouce, so it's 681 // Externalizing twice leaks the external resource, so it's
682 // prohibited by the API. 682 // prohibited by the API.
683 ASSERT(!this->IsExternalString()); 683 ASSERT(!this->IsExternalString());
684 #ifdef DEBUG 684 #ifdef DEBUG
685 if (FLAG_enable_slow_asserts) { 685 if (FLAG_enable_slow_asserts) {
686 // Assert that the resource and the string are equivalent. 686 // Assert that the resource and the string are equivalent.
687 ASSERT(static_cast<size_t>(this->length()) == resource->length()); 687 ASSERT(static_cast<size_t>(this->length()) == resource->length());
688 ScopedVector<uc16> smart_chars(this->length()); 688 ScopedVector<uc16> smart_chars(this->length());
689 String::WriteToFlat(this, smart_chars.start(), 0, this->length()); 689 String::WriteToFlat(this, smart_chars.start(), 0, this->length());
690 ASSERT(memcmp(smart_chars.start(), 690 ASSERT(memcmp(smart_chars.start(),
691 resource->data(), 691 resource->data(),
(...skipping 8046 matching lines...) Expand 10 before | Expand all | Expand 10 after
8738 if (break_point_objects()->IsUndefined()) return 0; 8738 if (break_point_objects()->IsUndefined()) return 0;
8739 // Single beak point. 8739 // Single beak point.
8740 if (!break_point_objects()->IsFixedArray()) return 1; 8740 if (!break_point_objects()->IsFixedArray()) return 1;
8741 // Multiple break points. 8741 // Multiple break points.
8742 return FixedArray::cast(break_point_objects())->length(); 8742 return FixedArray::cast(break_point_objects())->length();
8743 } 8743 }
8744 #endif 8744 #endif
8745 8745
8746 8746
8747 } } // namespace v8::internal 8747 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | src/regexp-macro-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698