Bug 1421355, part 5 - Remove nsXPConnect::NotifyDidPaint(). r=mrbkap draft
authorAndrew McCreight <continuation@gmail.com>
Tue, 28 Nov 2017 10:00:38 -0800 (2017-11-28)
changeset 705294 f82ae6b30ffc86b8534e80806ca6ff8de535b70f
parent 705293 5970cfbd273ffe2149cbbd503561570eef294fe6
child 705295 54dbdec33af4b8af826c466cf4b0e4bee9804c13
push id91438
push userbmo:continuation@gmail.com
push dateWed, 29 Nov 2017 21:45:57 +0000 (2017-11-29)
reviewersmrbkap
bugs1421355
milestone59.0a1
Bug 1421355, part 5 - Remove nsXPConnect::NotifyDidPaint(). r=mrbkap Presshell still does something along these lines, but it works completely differently. MozReview-Commit-ID: JRenEDNlo6p
js/xpconnect/idl/nsIXPConnect.idl
js/xpconnect/src/nsXPConnect.cpp
--- a/js/xpconnect/idl/nsIXPConnect.idl
+++ b/js/xpconnect/idl/nsIXPConnect.idl
@@ -440,22 +440,16 @@ interface nsIXPConnect : nsISupports
      *         intends to use the return value from this call the caller
      *         is responsible for rooting the jsval before making a call
      *         to this method.
      */
     [noscript] jsval evalInSandboxObject(in AString source, in string filename,
                                          in JSContextPtr cx,
                                          in JSObjectPtr sandbox);
 
-    /**
-     * Signals a good place to do an incremental GC slice, because the
-     * browser is drawing a frame.
-     */
-    void NotifyDidPaint();
-
     [noscript] void writeScript(in nsIObjectOutputStream aStream,
                                 in JSContextPtr aJSContext,
                                 in JSScriptPtr aJSScript);
 
     [noscript] JSScriptPtr readScript(in nsIObjectInputStream aStream,
                                       in JSContextPtr aJSContext);
 
     [noscript] void writeFunction(in nsIObjectOutputStream aStream,
--- a/js/xpconnect/src/nsXPConnect.cpp
+++ b/js/xpconnect/src/nsXPConnect.cpp
@@ -992,23 +992,16 @@ void
 SetLocationForGlobal(JSObject* global, nsIURI* locationURI)
 {
     MOZ_ASSERT(global);
     CompartmentPrivate::Get(global)->SetLocationURI(locationURI);
 }
 
 } // namespace xpc
 
-NS_IMETHODIMP
-nsXPConnect::NotifyDidPaint()
-{
-    JS::NotifyDidPaint(XPCJSContext::Get()->Context());
-    return NS_OK;
-}
-
 static nsresult
 WriteScriptOrFunction(nsIObjectOutputStream* stream, JSContext* cx,
                       JSScript* scriptArg, HandleObject functionObj)
 {
     // Exactly one of script or functionObj must be given
     MOZ_ASSERT(!scriptArg != !functionObj);
 
     RootedScript script(cx, scriptArg);