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

Unified Diff: runtime/vm/object.h

Issue 474033002: Ensure that hash for a symbol is not set to 0 when it is made external. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 39255)
+++ runtime/vm/object.h (working copy)
@@ -5389,6 +5389,10 @@
this->SetHash(result);
return result;
}
+ bool HasHash() const {
+ ASSERT(Smi::New(0) == NULL);
+ return (raw_ptr()->hash_ != NULL);
+ }
static intptr_t hash_offset() { return OFFSET_OF(RawString, hash_); }
static intptr_t Hash(const String& str, intptr_t begin_index, intptr_t len);
@@ -5602,11 +5606,6 @@
bool Equals(const uint8_t* characters, intptr_t len) const;
static intptr_t Hash(const uint8_t* characters, intptr_t len);
- bool HasHash() const {
- ASSERT(Smi::New(0) == NULL);
- return (raw_ptr()->hash_ != NULL);
- }
-
void SetLength(intptr_t value) const {
// This is only safe because we create a new Smi, which does not cause
// heap allocation.
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698