[webkit-dev] Is it possible to run WebKit GTK without X11 Server?

2010-10-03 Thread Li Ming
Hi, I have looked at a webkit ford named wkhtmltopdf (" http://code.google.com/p/wkhtmltopdf/";) It's based on a webkit-qt port, which has this feature: - (Linux) No longer requires an XServer to be running (however the X11 client libs must be installed) I wonder if it's feasible to do

Re: [webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread David Levin
Thanks Peter and Darin. In summary, looking at code like this B& b = c->foo(); ... b.m(); If c->foo() returns a temporary ("return B();"), then it is safe. If c->foo() returns a reference to a member variable ("return m_b;"), then it is up to the lifetime of of "c->m_b". The cases that Adam

Re: [webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread Peter Kasting
On Sun, Oct 3, 2010 at 10:31 AM, Darin Adler wrote: > What you say here about object lifetime is not correct. I thought the same > thing a year or so back. But the C++ language keeps these objects alive > until the end of the block. > Correct. One helpful section from the standard (12.2/5 "Temp

Re: [webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread Holger Freyther
On 10/04/2010 01:31 AM, Darin Adler wrote: > > What you say here about object lifetime is not correct. I thought the same > thing a year or so back. But the C++ language keeps these objects alive until > the end of the block. Some other programmers on the project challenged me > when I made th

Re: [webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread Adam Barth
On Sun, Oct 3, 2010 at 10:31 AM, Darin Adler wrote: > On Oct 3, 2010, at 2:21 AM, Adam Barth wrote: >> If a function returns a temporary, you probably don't want to hold onto it >> with a "const Foo& foo".  The temporary will get deallocated >> and then you'll be left with a reference to dead mem

Re: [webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread Darin Adler
On Oct 3, 2010, at 2:21 AM, Adam Barth wrote: > If a function returns a temporary, you probably don't want to hold onto it > with a "const Foo& foo". The temporary will get deallocated > and then you'll be left with a reference to dead memory, which is bad new > bears: I don’t understand why t

[webkit-dev] PSA: Don't try to hold onto temporaries with references

2010-10-03 Thread Adam Barth
If a function returns a temporary, you probably don't want to hold onto it with a "const Foo& foo". The temporary will get deallocated and then you'll be left with a reference to dead memory, which is bad new bears: http://trac.webkit.org/changeset/68984 http://trac.webkit.org/changeset/68985 Th