Bug 1603036: Call delete_ instead of free_ in XDRBufferObject finalizer r=tcampbell
authorIain Ireland <iireland@mozilla.com>
Wed, 11 Dec 2019 20:14:14 +0000
changeset 506534 d6bd8269795ab5333a194a0a57f9f6e3d0955b97
parent 506533 f0da4af7033032bb2f8e0904ac876ceab957c860
child 506535 12c1e0fcd5446da8607c14e7f1c6d438694c4121
push id36906
push userdluca@mozilla.com
push dateThu, 12 Dec 2019 04:25:33 +0000
treeherdermozilla-central@a76095565161 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstcampbell
bugs1603036
milestone73.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 1603036: Call delete_ instead of free_ in XDRBufferObject finalizer r=tcampbell Differential Revision: https://phabricator.services.mozilla.com/D56786
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -4784,18 +4784,18 @@ XDRBufferObject* XDRBufferObject::create
                    MemoryUse::XDRBufferElements);
 
   return bufObj;
 }
 
 void XDRBufferObject::finalize(JSFreeOp* fop, JSObject* obj) {
   XDRBufferObject* buf = &obj->as<XDRBufferObject>();
   if (buf->hasData()) {
-    fop->free_(buf, buf->data(), buf->data()->length(),
-               MemoryUse::XDRBufferElements);
+    fop->delete_(buf, buf->data(), buf->data()->length(),
+                 MemoryUse::XDRBufferElements);
   }
 }
 
 static bool CodeModule(JSContext* cx, unsigned argc, Value* vp) {
   CallArgs args = CallArgsFromVp(argc, vp);
   if (!args.requireAtLeast(cx, "codeModule", 1)) {
     return false;
   }