edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] AutoCompartment other window
Date: Tue, 11 Feb 2014 06:55:22 -0500	[thread overview]
Message-ID: <20140111065522.eklhad@comcast.net> (raw)

Well, it only took a couple hours after my cleanup push to run into
a reproducible segfault.
I tracked it down to an AutoCompartment call.
Remember I said they were all gone; there is one that we actually need in html.cpp,
just before we destroy the object associated with the tag.
It's part of freeWindow().
Naturally I used the same old line,
but that sets the compartment of the current window;
we are not always freeing the current window.
q5 will quit session 5, for example.
So this is the only AutoCompartment that is not based on cw.
I fixed this and the segfault went away.

A question for you in jsdom.cpp function domLink().
This line

        JS::RootedObject owner_root(cw->jss->jcx, owner);

Then you use owner_root instead of owner thereafter.
Is this necessary?
owner is safely rooted on the heap and isn't going to go anywhere.
We could just use owner throughout and it would be much clearer.

Karl Dahlke

             reply	other threads:[~2014-02-11 11:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 11:55 Karl Dahlke [this message]
2014-02-11 15:41 ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140111065522.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).