jsdStackFrame::Eval leaks estate when failing to use ContextStack

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: timeless, Assigned: timeless)

Tracking

({coverity})

Trunk
coverity
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey, URL)

Attachments

(1 attachment)

862 bytes, patch
jorendorff
: review+
Details | Diff | Splinter Review
(Assignee)

Description

8 years ago
1952 jsdStackFrame::Eval (const nsAString &bytes, const nsACString &fileName,
1972     estate = JS_SaveExceptionState (cx);

1976     nsCOMPtr<nsIJSContextStack> stack = do_GetService("@mozilla.org/js/xpc/ContextStack;1", &rv);
1977     if (NS_FAILED(rv))
1978         return rv;
1979     rv = stack->Push(cx);
1980     if (NS_FAILED(rv))
1981         return rv;

1995     JS_RestoreExceptionState (cx, estate);
(Assignee)

Comment 1

8 years ago
Created attachment 439862 [details] [diff] [review]
patch
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #439862 - Flags: review?(jorendorff)
Whiteboard: fixed-in-tracemonkey

Comment 3

8 years ago
http://hg.mozilla.org/mozilla-central/rev/9f57684dd42a
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.