The default bug view has changed. See this FAQ.

Remove nsresult return value from nsXPConnect::GetSafeJSContext()

RESOLVED FIXED in mozilla15

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 611320 [details] [diff] [review]
Patch v1
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.
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/4b0cc175806e
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.