From 5d9538ac63527e03046df5209a2618a40a5a78f1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 25 Feb 2014 18:52:21 -0500 Subject: [PATCH] Back out revision c35458a437cc (bug 976305) for breaking DataStore tests. r=orange --- dom/bindings/Codegen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 355898c78075..0f116cfde065 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -5939,7 +5939,10 @@ class CGAbstractStaticBindingMethod(CGAbstractStaticMethod): def definition_body(self): unwrap = CGGeneric("""JS::CallArgs args = JS::CallArgsFromVp(argc, vp); -JS::Rooted obj(cx, &args.callee());""") +JS::Rooted obj(cx, args.computeThis(cx).toObjectOrNull()); +if (!obj) { + return false; +}""") return CGList([ CGIndenter(unwrap), self.generate_code() ], "\n\n").define()