Closed Bug 741245 Opened 12 years ago Closed 12 years ago

Remove nsresult return value from nsXPConnect::GetSafeJSContext()

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
      No description provided.
Attachment #611320 - Flags: review?(bobbyholley+bmo)
Comment on attachment 611320 [details] [diff] [review]
Patch v1


>diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp


>-      if (stack)
>-      {
>-        JSContext *cx = nsnull;
>-        stack->GetSafeJSContext(&cx);
>-        if (cx)
>-          ::JS_GC(cx);
>+      if (stack) {
>+        if (JSContext* cx = stack->GetSafeJSContext()) {
>+          JS_GC(cx);
>+        }

Given the other style in this file, there should be no braces here.
Attachment #611320 - Flags: review?(bobbyholley+bmo) → review+
Comment on attachment 611320 [details] [diff] [review]
Patch v1

> [uuid(b7056a2a-a02d-43b1-abb9-47f81f8bf258)]
> interface nsIThreadJSContextStack : nsIJSContextStack
> {
>     /* inherits methods of nsIJSContextStack */
>-    readonly attribute JSContext safeJSContext;
>+    [notxpcom,nostdcall] JSContext getSafeJSContext();
Please bump the iid.
https://hg.mozilla.org/mozilla-central/rev/4b0cc175806e
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: