~ubuntu-branches/ubuntu/feisty/firefox/feisty-updates

« back to all changes in this revision

Viewing changes to js/src/jsapi.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack
  • Date: 2008-04-18 12:57:37 UTC
  • mfrom: (1.1.23 upstream)
  • Revision ID: james.westby@ubuntu.com-20080418125737-83lgejl49nozzl63
Tags: 2.0.0.14+1nobinonly-0ubuntu0.7.4
[ Alexander Sack ]
* New security/stability upstream release (v2.0.0.14)
  - see USN-602-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
4083
4083
    }
4084
4084
    fun = js_NewFunction(cx, NULL, NULL, nargs, 0, obj, funAtom);
4085
4085
    if (!fun)
4086
 
        goto out;
 
4086
        goto out2;
4087
4087
 
4088
4088
    /* From this point the control must flow through the label out. */
4089
 
    JS_PUSH_TEMP_ROOT_FUNCTION(cx, fun, &tvr);
 
4089
    JS_PUSH_TEMP_ROOT_OBJECT(cx, fun->object, &tvr);
4090
4090
    if (nargs) {
4091
4091
        for (i = 0; i < nargs; i++) {
4092
4092
            argAtom = js_Atomize(cx, argnames[i], strlen(argnames[i]), 0);
4113
4113
        if (!OBJ_DEFINE_PROPERTY(cx, obj, ATOM_TO_JSID(funAtom),
4114
4114
                                 OBJECT_TO_JSVAL(fun->object),
4115
4115
                                 NULL, NULL, JSPROP_ENUMERATE, NULL)) {
4116
 
            return NULL;
 
4116
            fun = NULL;
 
4117
            goto out;
4117
4118
        }
4118
4119
    }
 
4120
    cx->weakRoots.newborn[GCX_OBJECT] = (JSGCThing *) fun->object;
4119
4121
 
4120
4122
  out:
4121
 
    cx->weakRoots.newborn[GCX_PRIVATE] = (JSGCThing *) fun;
4122
4123
    JS_POP_TEMP_ROOT(cx, &tvr);
4123
4124
 
4124
4125
  out2: