if (JSVAL_IS_GCTHING(token_)) {
     JS_BeginRequest(context_);
     JS_RemoveRoot(context_, &token_);
+    if (JS_GetOptions(context_) & JSOPTION_PRIVATE_IS_NSISUPPORTS)
+      static_cast<nsISupports*>(JS_GetContextPrivate(context_))->Release();
     JS_EndRequest(context_);
   }

Is calling JS_EndRequest(deleted_context_) a safe thing todo? Maybe
move the release call down two line, also what about the call to
JS_GetContextPrivate, does that  need to be called within a begin/end
request brackets.


On Thu, Mar 19, 2009 at 9:20 PM, Michael Nordman <[email protected]> wrote:
> Hey, great!
>
> Does (JS_GetOptions(context_) & JSOPTION_PRIVATE_IS_NSISUPPORTS) turn
> up false in workers... just checking.
>
> Does this introduce any leaks?
>
>
> On Thu, Mar 19, 2009 at 9:10 PM, Aaron Boodman <[email protected]> wrote:
>> Hello michaeln,
>>
>> I'd like you to do a code review. Please execute
>>         g4 diff -c 10549340
>>
>> or point your web browser to
>>         http://mondrian/10549340
>>
>> to review the following code:
>>
>> Change 10549340 by a...@aa-gears2 on 2009/03/19 21:09:22 *pending*
>>
>>          Attempt to fix crash when switching labs in offline gmail.
>>
>>         PRESUBMIT=passed
>>         R=michaeln
>>         [email protected]
>>         DELTA=4 (4 added, 0 deleted, 0 changed)
>>         OCL=10549340
>>
>> Affected files ...
>>
>> ... //depot/googleclient/gears/opensource/gears/base/common/js_types.cc  #53
>> edit
>>
>> 4 delta lines: 4 added, 0 deleted, 0 changed
>>
>> Also consider running:
>>         g4 lint -c 10549340
>>
>> which verifies that the changelist doesn't introduce new style violations.
>>
>> If you can't do the review, please let me know as soon as possible. During
>> your review, please ensure that all new code has corresponding unit tests
>> and
>> that existing unit tests are updated appropriately. Visit
>> http://www/eng/code_review.html for more information.
>>
>> This is a semiautomated message from "g4 mail". Complaints or suggestions?
>> Mail [email protected].
>>
>

Reply via email to