Back out revision c35458a437cc (bug 976305) for breaking DataStore tests. r=orange

This commit is contained in:
Boris Zbarsky 2014-02-25 18:52:21 -05:00
parent 048b93a1e5
commit c2283f49a9

View File

@ -5939,7 +5939,10 @@ class CGAbstractStaticBindingMethod(CGAbstractStaticMethod):
def definition_body(self):
unwrap = CGGeneric("""JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
JS::Rooted<JSObject*> obj(cx, &args.callee());""")
JS::Rooted<JSObject*> obj(cx, args.computeThis(cx).toObjectOrNull());
if (!obj) {
return false;
}""")
return CGList([ CGIndenter(unwrap),
self.generate_code() ], "\n\n").define()