Bug 1187062 - Part 0: Make js::Debugger::getObjectAllocationSite return a SavedFrame* rather than a JSObject*; r=sfink
authorNick Fitzgerald <fitzgen@gmail.com>
Fri, 14 Aug 2015 17:49:06 -0700
changeset 257942 d5014bce76b3063eb9e374cb567746368f50fcbd
parent 257941 6930b12ee1d11ffcd75abce2f5b9d5fba9d00d3c
child 257943 ae29da8d7f809822f9d535c32fa686692f7c5a46
push id29238
push userryanvm@gmail.com
push dateMon, 17 Aug 2015 13:06:57 +0000
treeherdermozilla-central@a6eeb28458fd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1187062
milestone43.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 1187062 - Part 0: Make js::Debugger::getObjectAllocationSite return a SavedFrame* rather than a JSObject*; r=sfink
js/src/vm/Debugger.cpp
js/src/vm/Debugger.h
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -6948,26 +6948,26 @@ DebuggerObject_getGlobal(JSContext* cx, 
 
 static bool
 null(CallArgs& args)
 {
     args.rval().setNull();
     return true;
 }
 
-/* static */ JSObject*
+/* static */ SavedFrame*
 Debugger::getObjectAllocationSite(JSObject& obj)
 {
     JSObject* metadata = GetObjectMetadata(&obj);
     if (!metadata)
         return nullptr;
 
     MOZ_ASSERT(!metadata->is<WrapperObject>());
     return SavedFrame::isSavedFrameAndNotProto(*metadata)
-        ? metadata
+        ? &metadata->as<SavedFrame>()
         : nullptr;
 }
 
 static bool
 DebuggerObject_getAllocationSite(JSContext* cx, unsigned argc, Value* vp)
 {
     THIS_DEBUGOBJECT_REFERENT(cx, argc, vp, "get allocationSite", args, obj);
 
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -282,17 +282,17 @@ class Debugger : private mozilla::Linked
         return trackingTenurePromotions;
     }
 
     bool isEnabled() const {
         return enabled;
     }
 
     void logTenurePromotion(JSRuntime* rt, JSObject& obj, double when);
-    static JSObject* getObjectAllocationSite(JSObject& obj);
+    static SavedFrame* getObjectAllocationSite(JSObject& obj);
 
     struct TenurePromotionsLogEntry : public JS::Traceable
     {
         TenurePromotionsLogEntry(JSRuntime* rt, JSObject& obj, double when);
 
         const char* className;
         double when;
         RelocatablePtrObject frame;