From: Adam Thompson <arthompson1990@gmail.com>
To: Karl Dahlke <eklhad@comcast.net>
Cc: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] gc rooted
Date: Sun, 26 Jan 2014 23:41:27 +0000 [thread overview]
Message-ID: <20140126234127.GA17921@toaster.adamthompson.me.uk> (raw)
In-Reply-To: <20140025114736.eklhad@comcast.net>
On Sat, Jan 25, 2014 at 11:47:36AM -0500, Karl Dahlke wrote:
> I finally read the gc rooted guide, and it makes my head spin,
> especially since I am still learning C++ on top of it.
>
> I wanted to start at the heart of the matter, jwin,
> which is a global pointer to a js object.
Yeah, I basically use JS_AddObjectRoot to root jwin when it's created in
createJavaContext.
This fixes the jwin rooting issue for the moment but as we've now got a c++
html parser (html.cpp) we can and should go for the opaque js struct.
In addition:
JS::RootedObject *jwin = new JS::RootedObjet
Is (I think) according to the gc rooting guide a really bad idea since it keeps
a rooted object on the heap which is illegal (it's only valid for the stack).
Cheers,
Adam.
prev parent reply other threads:[~2014-01-26 23:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 16:47 Karl Dahlke
2014-01-25 17:20 ` Chris Brannon
2014-01-26 23:41 ` Adam Thompson [this message]
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=20140126234127.GA17921@toaster.adamthompson.me.uk \
--to=arthompson1990@gmail.com \
--cc=Edbrowse-dev@lists.the-brannons.com \
--cc=eklhad@comcast.net \
/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).