Bug 1489522: Fix sizeof typos in js/src/builtin/Promise.cpp and js/src/builtin/Array.cpp. r=arai
authorRobert Bartlensky <rbartlensky@mozilla.com>
Fri, 07 Sep 2018 18:21:33 +0000
changeset 435304 60c37c0e5083756581d09785bcc489862c84a0fa
parent 435303 f00e66757346edeb268952f0164698de6602c697
child 435312 8a0c75485342d768c9ac23f0e6ddf522d23b2fd2
child 435313 30b97be4a9be94bcfe84e10ce42926dc129a4bcf
push id34603
push userccoroiu@mozilla.com
push dateSat, 08 Sep 2018 13:16:18 +0000
treeherdermozilla-central@60c37c0e5083 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarai
bugs1489522
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1489522: Fix sizeof typos in js/src/builtin/Promise.cpp and js/src/builtin/Array.cpp. r=arai Differential Revision: https://phabricator.services.mozilla.com/D5274
js/src/builtin/Array.cpp
js/src/builtin/Promise.cpp
--- a/js/src/builtin/Array.cpp
+++ b/js/src/builtin/Array.cpp
@@ -4188,17 +4188,17 @@ js::ArraySpeciesLookup::initialize(JSCon
 #endif
     arrayProtoShape_ = arrayProto->lastProperty();
     arrayProtoConstructorSlot_ = ctorShape->slot();
 }
 
 void
 js::ArraySpeciesLookup::reset()
 {
-    JS_POISON(this, 0xBB, sizeof(this), MemCheckKind::MakeUndefined);
+    JS_POISON(this, 0xBB, sizeof(*this), MemCheckKind::MakeUndefined);
     state_ = State::Uninitialized;
 }
 
 bool
 js::ArraySpeciesLookup::isArrayStateStillSane()
 {
     MOZ_ASSERT(state_ == State::Initialized);
 
--- a/js/src/builtin/Promise.cpp
+++ b/js/src/builtin/Promise.cpp
@@ -4314,17 +4314,17 @@ js::PromiseLookup::initialize(JSContext*
     promiseResolveSlot_ = resolveShape->slot();
     promiseProtoConstructorSlot_ = ctorShape->slot();
     promiseProtoThenSlot_ = thenShape->slot();
 }
 
 void
 js::PromiseLookup::reset()
 {
-    JS_POISON(this, 0xBB, sizeof(this), MemCheckKind::MakeUndefined);
+    JS_POISON(this, 0xBB, sizeof(*this), MemCheckKind::MakeUndefined);
     state_ = State::Uninitialized;
 }
 
 bool
 js::PromiseLookup::isPromiseStateStillSane(JSContext* cx)
 {
     MOZ_ASSERT(state_ == State::Initialized);