edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] prerender and javaSetsLinkage
@ 2015-09-25 14:11 Karl Dahlke
  2015-09-25 22:06 ` Adam Thompson
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2015-09-25 14:11 UTC (permalink / raw)
  To: Edbrowse-dev

Yes, edbrowse did a seg fault on my own website.   Yikes!
I run google ads, and their js is quite involved.
At db4 I could see that it was adding a new input field to a form,
adding dynamically using appendchild().
That was never even implemented before, so this is new territory.
The object was added, the side effect passed back to edbrowse,
a new tag created, and linked into our dom tree, all good.
Then time to render.
But there is a prerender routine that sanitizes things before render() runs.
Example, link each input field to the form that contains it.
When tags are added later, dynamically, prerender is already done.
the sanitizing does not take place.
This new input field wasn't tied to a specific form in our tree,
and the input value was not preset to the empty string.
It was still null, thus the seg fault.
I fixed this up in a hurry by adding some code to javaSetsLinkage,
that if an input tag is linked in I do some of the same things
that prerender would have done.
But this is the tip of the iceberg, isn't it?
We should not react to each seg fault, but rather act proactively.
More of the prerender sanitizing logic should be pulled out
into small routines at the top, that are called by prerender()
or by javaSetsLinkage().
I'll try to chip away at this in the next week or so.

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-25 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-25 14:11 [Edbrowse-dev] prerender and javaSetsLinkage Karl Dahlke
2015-09-25 22:06 ` Adam Thompson
2015-09-25 22:15   ` Chris Brannon

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).