Last Comment Bug 325479 - Failure to free a JSScript in obj_eval
: Failure to free a JSScript in obj_eval
Status: RESOLVED FIXED
[tcn-dl]
: fixed1.8.0.2, fixed1.8.1
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Linux
: P2 normal (vote)
: mozilla1.9alpha1
Assigned To: Blake Kaplan (:mrbkap)
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: 313236
  Show dependency treegraph
 
Reported: 2006-02-01 11:14 PST by Blake Kaplan (:mrbkap)
Modified: 2006-03-02 11:43 PST (History)
5 users (show)
bob: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Branch patch (1.96 KB, patch)
2006-02-01 11:19 PST, Blake Kaplan (:mrbkap)
brendan: review+
brendan: approval‑branch‑1.8.1+
brendan: approval1.8.0.2+
Details | Diff | Splinter Review

Description Blake Kaplan (:mrbkap) 2006-02-01 11:14:11 PST
Michael Daumling pointed this out in a private e-mail to brendan. I've checked in a fix for it on the trunk, but we should fix it on the branch too, since it's such a simple fix.

The code in question is:
    ok = js_CheckPrincipalsAccess(cx, scopeobj, principals, js_eval_str);
    if (!ok)
        goto out;

    ok = js_Execute(cx, scopeobj, script, caller, JSFRAME_EVAL, rval);
    JS_DestroyScript(cx, script);

out:

I'll attach a patch for branch consideration in a second.
Comment 1 Blake Kaplan (:mrbkap) 2006-02-01 11:19:19 PST
Created attachment 210375 [details] [diff] [review]
Branch patch

This is the patch I checked in (backported to the paramaterization changes for js_CheckPrincipalsAccess). Brendan, mind stamping this for posterity?
Comment 2 Blake Kaplan (:mrbkap) 2006-02-01 11:20:04 PST
This is already fixed on the trunk, marking it as such.
Comment 3 Brendan Eich [:brendan] 2006-02-01 14:20:01 PST
Comment on attachment 210375 [details] [diff] [review]
Branch patch

Another no-braner ;-).

/be
Comment 4 Blake Kaplan (:mrbkap) 2006-02-23 15:50:38 PST
Fix checked into the 1.8 branches.
Comment 5 Dave Liebreich [:davel] 2006-03-02 11:43:44 PST
Please provide a testcase and/or testing guidance for this fix.

Note You need to log in before you can comment on or make changes to this bug.