[webkit-dev] document()->frame()->script()->globalObject()

Eric Seidel eric at webkit.org
Thu Jul 23 17:23:58 PDT 2009


It seems all lookups of the current globalObject go through the frame.
document()->frame()->script()->globalObject() is one example.

Another:
JSValue toJS(ExecState*, DOMWindow* domWindow)
{
    if (!domWindow)
        return jsNull();
    Frame* frame = domWindow->frame();
    if (!frame)
        return jsNull();
    return frame->script()->windowShell();
}

Why?  Shouldn't the Document know what its JSDOMGlobalObject is,
regardless of whether its currently in a Frame or not?

-eric


More information about the webkit-dev mailing list