Bug 934485 - Remove unused ProxyOptions::forceForegroundFinalization() r=terrence
authorJon Coppeard <jcoppeard@mozilla.com>
Tue, 05 Nov 2013 10:15:40 +0000
changeset 168177 6fe3a73c35d88a3b5c54a18c4f9eadabab1431f0
parent 168176 aa71e5360811dad7407af13aba6ea7bf170e300f
child 168178 94032114aaf5f2a8e41811e86f02aa367e15325a
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs934485
milestone28.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 934485 - Remove unused ProxyOptions::forceForegroundFinalization() r=terrence
js/src/jsproxy.h
js/src/vm/ProxyObject.cpp
--- a/js/src/jsproxy.h
+++ b/js/src/jsproxy.h
@@ -352,44 +352,34 @@ SetProxyExtra(JSObject *obj, size_t n, c
     JS_ASSERT(IsProxy(obj));
     JS_ASSERT(n <= 1);
     SetReservedSlot(obj, PROXY_EXTRA_SLOT + n, extra);
 }
 
 class MOZ_STACK_CLASS ProxyOptions {
   public:
     ProxyOptions() : callable_(false),
-                     singleton_(false),
-                     forceForegroundFinalization_(false)
+                     singleton_(false)
     {}
 
     bool callable() const { return callable_; }
     ProxyOptions &setCallable(bool flag) {
         callable_ = flag;
         return *this;
     }
 
     bool singleton() const { return singleton_; }
     ProxyOptions &setSingleton(bool flag) {
         singleton_ = flag;
         return *this;
     }
 
-    bool forceForegroundFinalization() const {
-        return forceForegroundFinalization_;
-    }
-    ProxyOptions &setForceForegroundFinalization(bool flag) {
-        forceForegroundFinalization_ = true;
-        return *this;
-    }
-
   private:
     bool callable_;
     bool singleton_;
-    bool forceForegroundFinalization_;
 };
 
 JS_FRIEND_API(JSObject *)
 NewProxyObject(JSContext *cx, BaseProxyHandler *handler, HandleValue priv,
                JSObject *proto, JSObject *parent, const ProxyOptions &options = ProxyOptions());
 
 JSObject *
 RenewProxyObject(JSContext *cx, JSObject *obj, BaseProxyHandler *handler, Value priv);
--- a/js/src/vm/ProxyObject.cpp
+++ b/js/src/vm/ProxyObject.cpp
@@ -38,17 +38,17 @@ ProxyObject::New(JSContext *cx, BaseProx
         RootedObject protoObj(cx, proto.toObject());
         if (!JSObject::setNewTypeUnknown(cx, clasp, protoObj))
             return nullptr;
     }
 
     NewObjectKind newKind =
         (clasp == &OuterWindowProxyObject::class_ || options.singleton()) ? SingletonObject : GenericObject;
     gc::AllocKind allocKind = gc::GetGCObjectKind(clasp);
-    if (!options.forceForegroundFinalization() && handler->finalizeInBackground(priv))
+    if (handler->finalizeInBackground(priv))
         allocKind = GetBackgroundAllocKind(allocKind);
     RootedObject obj(cx, NewObjectWithGivenProto(cx, clasp, proto, parent, allocKind, newKind));
     if (!obj)
         return nullptr;
 
     Rooted<ProxyObject*> proxy(cx, &obj->as<ProxyObject>());
     proxy->initHandler(handler);
     proxy->initCrossCompartmentPrivate(priv);