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

Unified Diff: src/objects-inl.h

Issue 759823006: Ensure double alignment when deserializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 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
« no previous file with comments | « src/objects-debug.cc ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 03aea64736d818f456c748f76a31d583593dc664..b05de472e9c81f8b1225d0d5f5448e7868779f26 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2758,6 +2758,17 @@ WriteBarrierMode HeapObject::GetWriteBarrierMode(
}
+bool HeapObject::NeedsToEnsureDoubleAlignment() {
+#ifndef V8_HOST_ARCH_64_BIT
+ return (IsFixedFloat64Array() || IsFixedDoubleArray() ||
+ IsConstantPoolArray()) &&
+ FixedArrayBase::cast(this)->length() != 0;
+#else
+ return false;
+#endif // V8_HOST_ARCH_64_BIT
+}
+
+
void FixedArray::set(int index,
Object* value,
WriteBarrierMode mode) {
« no previous file with comments | « src/objects-debug.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698