dear all:

    I have a question about the objects referencing between Javasciptcore
and WebCore:

    JSNode uses m_impl to reference a Node in WebCore. And when
KJS::Collector::collect() is called the function mark() of each JSNode is
invoked to keep the corresponding Node in WebCore alive in memory.

    The problem is: I want to seperate the memory managment of
each page. To do so, I allocate a large block of memory for eache page,
and delete it when loading the next page. ( I have commented out
'pagecache', 'backforwardlist' etc.)

    But, when it jumps back to a page which has been visited before, and a
block of
javascipt codes is excuted, it crashes when JSNode use m_impl to reference
a Node in WebCore. The reason is m_impl is pointing an empty memory block.

   I used gdb to examine the value of m_impl, and I found that it likely
contained an
address  of a Node created when this page was loaded the first time.

   My question is: how do JavaSciptCore maintain the JSNode(s) to make them
reference
the old Nodes? And how can I force JSNode's m_impl reference the new Node?

   Do I make myself clear?
   Appreciate any clues!

    thx!

ZHOU Xiao-bo
_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to