[Webkit-unassigned] [Bug 31626] [Qt] layoutTestController.notifyDone() not working when the frame was reloaded.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 18 12:44:24 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=31626





--- Comment #7 from Kenneth Rohde Christiansen <kenneth at webkit.org>  2009-11-18 12:44:22 PST ---
For reference this is out implementation of addToJavaScriptWindowObject.

Does anyone spot any obvious bug?

 446 void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject
*object, QScriptEngine::ValueOwnership ownership)
 447 {
 448     if
(!page()->settings()->testAttribute(QWebSettings::JavascriptEnabled))
 449         return;
 450
 451     JSC::JSLock lock(JSC::SilenceAssertionsOnly);
 452     JSDOMWindow* window = toJSDOMWindow(d->frame,
mainThreadNormalWorld());
 453     JSC::Bindings::RootObject* root =
d->frame->script()->bindingRootObject();
 454     if (!window) {
 455         qDebug() << "Warning: couldn't get window object";
 456         return;
 457     }
 458
 459     JSC::ExecState* exec = window->globalExec();
 460
 461     JSC::JSObject* runtimeObject =
 462             JSC::Bindings::QtInstance::getQtInstance(object, root,
ownership)->createRuntimeObject(exec);
 463
 464     JSC::PutPropertySlot slot;
 465     window->put(exec, JSC::Identifier(exec, (const UChar *)
name.constData(), name.length()), runtimeObject, slot);
 466 }

It seems to get the window from the WebCore::Frame and then to add the
properties (line 464-465).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list