webkit scriptengine & multiple plasmoids

Petri Damstén petri.damsten at gmail.com
Fri Dec 18 09:13:37 CET 2009


On Friday 18 December 2009 00:17:19 Marco Martin wrote:
> On Thursday 17 December 2009, Petri Damstén wrote:
> > Hi,
> >
> > I'm trying to fix this bug: http://www.kde-
> > look.org/content/show.php/Scripted+Image?content=91749 (Error having 2 of
> > them). Seems that if there is two (or more) same webkit plasmoids on
> >  desktop only one of them loads properly on plasma start. When same
> >  plasmoid B load is started before A load is finished javascript
> > functions don't get called. This happens only when plasmoids are same
> > e.g. two scripted-image plasmoids. I made attached patch to load
> > plasmoids with the same plugin name in queue and it seems to solve this
> > but I'm not sure if this right way to do it?
> >
> > Petri
> 
> seems an hacky workaround, but i can'r really think about a possible real
> cause of this...
> could be a bug in webkit itself, maybe has some internal sigleton class
>  that gets in an inconsistent state when two pages load the same url in the
>  same moment? seems terribly unlikely but...

Yes it's hacky and I don't like it either. Debugged a little more and noticed 
that if webkit is already loading the same page it emits loadFinished right 
away for the next pages. I would guess that loadFinished is emitted too early 
and calling init fails because javascript is not yet ready.

Petri

koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1ba51d0) 
"webkit-test"
koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1bcbe60) 
"webkit-test"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1bcbe60) "webkit-test"
koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1bd31d0) 
"webkit-test"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1bd31d0) "webkit-test"
koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1bdf020) 
"webkit-test"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1bdf020) "webkit-test"
koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1bedd10) 
"scriptedimage"
koe(5356)/plasma WebApplet::init: Loading frame:  QWebFrame(0x1bda090) 
"scriptedimage"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1bda090) "scriptedimage"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1ba51d0) "webkit-test"
koe(5356)/plasma WebApplet::loadFinished: Load finished for frame:  
QWebFrame(0x1bedd10) "scriptedimage"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20091218/065b22c4/attachment.sig 


More information about the Plasma-devel mailing list