Changeset 24241 in webkit


Ignore:
Timestamp:
Jul 12, 2007 9:34:14 AM (17 years ago)
Author:
weinig
Message:

LayoutTests:

Reviewed by Maciej.

Test for <rdar://problem/5329841>
Calling window.closed on a closed window causes Safari to crash

  • fast/dom/Window/window-closed-crash-expected.txt: Added.
  • fast/dom/Window/window-closed-crash.html: Added.

WebCore:

Reviewed by Maciej.

Patch for <rdar://problem/5329841>
Calling window.closed on a closed window causes Safari to crash

  • Replaces the Frame member variable in KJS::Window for more appropriate DOMWindow
  • Adds additional new null checks as necessary
  • Removes bogus toBoolean method
  • Removes unused scheduleClose method

Test: fast/dom/Window/window-closed-crash.html

  • bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::create):
  • bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetOwnPropertySlot): (WebCore::JSDOMWindow::customPut):
  • bindings/js/JSXMLHttpRequest.cpp: (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
  • bindings/js/kjs_events.cpp: (WebCore::JSAbstractEventListener::handleEvent): (WebCore::JSLazyEventListener::parseCode):
  • bindings/js/kjs_window.cpp: (KJS::Window::Window): (KJS::Window::impl): (KJS::Window::interpreter): (KJS::Window::location): (KJS::Window::find): (KJS::allowPopUp): (KJS::createWindow): (KJS::canShowModalDialog): (KJS::canShowModalDialogNow): (KJS::showModalDialog): (KJS::Window::getValueProperty): (KJS::Window::childFrameGetter): (KJS::Window::indexGetter): (KJS::Window::namedItemGetter): (KJS::Window::getOwnPropertySlot): (KJS::Window::put): (KJS::Window::isSafeScript): (KJS::Window::setListener): (KJS::Window::getListener): (KJS::Window::clear): (KJS::WindowFunc::callAsFunction): (KJS::Window::updateLayout): (KJS::ScheduledAction::execute): (KJS::Window::disconnectFrame): (KJS::Location::put): (KJS::LocationFunc::callAsFunction):
  • bindings/js/kjs_window.h:
  • page/mac/WebCoreFrameBridge.mm: (updateRenderingForBindings):
Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r24240 r24241  
     12007-07-11  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Maciej.
     4
     5        Test for <rdar://problem/5329841>
     6        Calling window.closed on a closed window causes Safari to crash
     7
     8        * fast/dom/Window/window-closed-crash-expected.txt: Added.
     9        * fast/dom/Window/window-closed-crash.html: Added.
     10
    1112007-07-12  Mitz Pettel  <mitz@webkit.org>
    212
  • trunk/WebCore/ChangeLog

    r24238 r24241  
     12007-07-11  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Maciej.
     4
     5        Patch for <rdar://problem/5329841>
     6        Calling window.closed on a closed window causes Safari to crash
     7
     8        - Replaces the Frame member variable in KJS::Window for more appropriate DOMWindow
     9        - Adds additional new null checks as necessary
     10        - Removes bogus toBoolean method
     11        - Removes unused scheduleClose method
     12
     13        Test: fast/dom/Window/window-closed-crash.html
     14
     15        * bindings/js/JSCustomXPathNSResolver.cpp:
     16        (WebCore::JSCustomXPathNSResolver::create):
     17        * bindings/js/JSDOMWindowCustom.cpp:
     18        (WebCore::JSDOMWindow::customGetOwnPropertySlot):
     19        (WebCore::JSDOMWindow::customPut):
     20        * bindings/js/JSXMLHttpRequest.cpp:
     21        (KJS::JSXMLHttpRequestPrototypeFunction::callAsFunction):
     22        * bindings/js/kjs_events.cpp:
     23        (WebCore::JSAbstractEventListener::handleEvent):
     24        (WebCore::JSLazyEventListener::parseCode):
     25        * bindings/js/kjs_window.cpp:
     26        (KJS::Window::Window):
     27        (KJS::Window::impl):
     28        (KJS::Window::interpreter):
     29        (KJS::Window::location):
     30        (KJS::Window::find):
     31        (KJS::allowPopUp):
     32        (KJS::createWindow):
     33        (KJS::canShowModalDialog):
     34        (KJS::canShowModalDialogNow):
     35        (KJS::showModalDialog):
     36        (KJS::Window::getValueProperty):
     37        (KJS::Window::childFrameGetter):
     38        (KJS::Window::indexGetter):
     39        (KJS::Window::namedItemGetter):
     40        (KJS::Window::getOwnPropertySlot):
     41        (KJS::Window::put):
     42        (KJS::Window::isSafeScript):
     43        (KJS::Window::setListener):
     44        (KJS::Window::getListener):
     45        (KJS::Window::clear):
     46        (KJS::WindowFunc::callAsFunction):
     47        (KJS::Window::updateLayout):
     48        (KJS::ScheduledAction::execute):
     49        (KJS::Window::disconnectFrame):
     50        (KJS::Location::put):
     51        (KJS::LocationFunc::callAsFunction):
     52        * bindings/js/kjs_window.h:
     53        * page/mac/WebCoreFrameBridge.mm:
     54        (updateRenderingForBindings):
     55
    1562007-07-12  Mark Rowe  <mrowe@apple.com>
    257
  • trunk/WebCore/bindings/js/JSCustomXPathNSResolver.cpp

    r21706 r24241  
    3030
    3131#include "CString.h"
     32#include "DOMWindow.h"
    3233#include "Document.h"
    3334#include "ExceptionCode.h"
     
    5455    }
    5556   
    56     return new JSCustomXPathNSResolver(resolverObject, KJS::Window::retrieveActive(exec)->frame());
     57    return new JSCustomXPathNSResolver(resolverObject, KJS::Window::retrieveActive(exec)->impl()->frame());
    5758}
    5859
  • trunk/WebCore/bindings/js/JSDOMWindowCustom.cpp

    r24182 r24241  
    2222
    2323#include "kjs_window.h"
     24#include "DOMWindow.h"
    2425
    2526namespace WebCore {
     
    2829{
    2930    // we don't want any properties other than "closed" on a closed window
    30     if (!frame()) {
     31    if (!impl()->frame()) {
    3132        if (propertyName == "closed") {
    3233            const KJS::HashEntry* entry = KJS::Lookup::findEntry(classInfo()->propHashTable, propertyName);
     
    9293bool JSDOMWindow::customPut(KJS::ExecState* exec, const KJS::Identifier& propertyName, KJS::JSValue* value, int attr)
    9394{
    94     if (!frame())
     95    if (!impl()->frame())
    9596        return true;
    9697
  • trunk/WebCore/bindings/js/JSXMLHttpRequest.cpp

    r24227 r24241  
    2222#include "JSXMLHttpRequest.h"
    2323
     24#include "DOMWindow.h"
    2425#include "Event.h"
    2526#include "Frame.h"
     
    219220
    220221            String method = args[0]->toString(exec);
    221             KURL url = Window::retrieveActive(exec)->frame()->loader()->completeURL(DeprecatedString(args[1]->toString(exec)));
     222            Frame* frame = Window::retrieveActive(exec)->impl()->frame();
     223            if (!frame)
     224                return jsUndefined();
     225            KURL url = frame->loader()->completeURL(DeprecatedString(args[1]->toString(exec)));
    222226
    223227            bool async = true;
  • trunk/WebCore/bindings/js/kjs_events.cpp

    r23892 r24241  
    2626#include "Clipboard.h"
    2727#include "ClipboardEvent.h"
     28#include "DOMWindow.h"
    2829#include "Document.h"
    2930#include "Event.h"
     
    7172    if (!window)
    7273        return;
    73     Frame *frame = window->frame();
     74    Frame *frame = window->impl()->frame();
    7475    if (!frame)
    7576        return;
     
    291292    m_parsed = true;
    292293
    293     Frame* frame = windowObj()->frame();
     294    Frame* frame = windowObj()->impl()->frame();
    294295    KJSProxy* proxy = 0;
    295296    if (frame)
  • trunk/WebCore/bindings/js/kjs_window.cpp

    r24182 r24241  
    223223
    224224Window::Window(DOMWindow* window)
    225   : m_frame(window->frame())
     225  : m_impl(window)
    226226  , d(new WindowPrivate)
    227227{
     
    255255DOMWindow* Window::impl() const
    256256{
    257      return m_frame->domWindow();
    258 }
    259 
    260 ScriptInterpreter *Window::interpreter() const
    261 {
    262     return m_frame->scriptProxy()->interpreter();
     257     return m_impl.get();
     258}
     259
     260ScriptInterpreter* Window::interpreter() const
     261{
     262    Frame* frame = impl()->frame();
     263    if (!frame)
     264        return 0;
     265
     266    return frame->scriptProxy()->interpreter();
    263267}
    264268
     
    290294{
    291295  if (!d->loc)
    292     d->loc = new Location(m_frame);
     296    d->loc = new Location(impl()->frame());
    293297  return d->loc;
    294298}
     
    297301{
    298302    // FIXME (13016): Support wholeWord, searchInFrames and showDialog
    299     return m_frame->findString(string, !backwards, caseSensitive, wrap, false);
     303    Frame* frame = impl()->frame();
     304    if (!frame)
     305        return false;
     306
     307    return frame->findString(string, !backwards, caseSensitive, wrap, false);
    300308}
    301309
     
    310318static bool allowPopUp(ExecState *exec, Window *window)
    311319{
    312     if (!window->frame())
     320    Frame* frame = window->impl()->frame();
     321    if (!frame)
    313322        return false;
    314323    if (static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->wasRunByUserGesture())
    315324        return true;
    316     Settings* settings = window->frame()->settings();
     325    Settings* settings = frame->settings();
    317326    return settings && settings->JavaScriptCanOpenWindowsAutomatically();
    318327}
     
    379388    const String& frameName, const WindowFeatures& windowFeatures, JSValue* dialogArgs)
    380389{
    381     Frame* activeFrame = Window::retrieveActive(exec)->frame();
     390    Frame* activeFrame = Window::retrieveActive(exec)->impl()->frame();
    382391   
    383392    ResourceRequest request;
     
    425434static bool canShowModalDialog(const Window *window)
    426435{
    427     if (Frame* frame = window->frame())
    428         return frame->page()->chrome()->canRunModal();
    429     return false;
     436    Frame* frame = window->impl()->frame();
     437    if (!frame)
     438        return false;
     439
     440    return frame->page()->chrome()->canRunModal();
    430441}
    431442
    432443static bool canShowModalDialogNow(const Window *window)
    433444{
    434     if (Frame* frame = window->frame())
    435         return frame->page()->chrome()->canRunModalNow();
    436     return false;
     445    Frame* frame = window->impl()->frame();
     446    if (!frame)
     447        return false;
     448
     449    return frame->page()->chrome()->canRunModalNow();
    437450}
    438451
     
    455468    // - help: boolFeature(features, "help", true), makes help icon appear in dialog (what does it do on Windows?)
    456469    // - unadorned: trusted && boolFeature(features, "unadorned");
    457 
    458     FloatRect screenRect = screenAvailableRect(openerWindow->frame()->view());
     470    Frame* frame = openerWindow->impl()->frame();
     471    if (!frame)
     472        return jsUndefined();
     473
     474    FloatRect screenRect = screenAvailableRect(frame->view());
    459475
    460476    wargs.width = floatFeature(features, "dialogwidth", 100, screenRect.width(), 620); // default here came from frame size of dialog in MacIE
     
    488504    wargs.fullscreen = false;
    489505   
    490     Frame* dialogFrame = createWindow(exec, openerWindow->frame(), valueToStringWithUndefinedOrNullCheck(exec, args[0]), "", wargs, args[1]);
     506    Frame* dialogFrame = createWindow(exec, frame, valueToStringWithUndefinedOrNullCheck(exec, args[0]), "", wargs, args[1]);
    491507    if (!dialogFrame)
    492508        return jsUndefined();
     
    512528JSValue *Window::getValueProperty(ExecState *exec, int token) const
    513529{
    514    ASSERT(m_frame);
     530   ASSERT(impl()->frame());
    515531
    516532   switch (token) {
     
    524540      return getDOMExceptionConstructor(exec);
    525541    case Frames:
    526       return retrieve(m_frame);
     542      return retrieve(impl()->frame());
    527543    case Event_:
    528544      if (!isSafeScript(exec))
     
    538554        return jsUndefined();
    539555      // Store the navigator in the object so we get the same one each time.
    540       Navigator *n = new Navigator(exec, m_frame);
     556      Navigator *n = new Navigator(exec, impl()->frame());
    541557      // FIXME: this will make the "navigator" object accessible from windows that fail
    542558      // the security check the first time, but not subsequent times, seems weird.
     
    546562    }
    547563    case Opener:
    548       if (m_frame->loader()->opener())
    549         return retrieve(m_frame->loader()->opener());
     564      if (impl()->frame()->loader()->opener())
     565        return retrieve(impl()->frame()->loader()->opener());
    550566      return jsNull();
    551567    case Parent:
    552       return retrieve(m_frame->tree()->parent() ? m_frame->tree()->parent() : m_frame);
     568      return retrieve(impl()->frame()->tree()->parent() ? impl()->frame()->tree()->parent() : impl()->frame());
    553569    case Self:
    554570    case Window_:
    555       return retrieve(m_frame);
     571      return retrieve(impl()->frame());
    556572    case Top:
    557       return retrieve(m_frame->page()->mainFrame());
     573      return retrieve(impl()->frame()->page()->mainFrame());
    558574    case Image:
    559575      if (!isSafeScript(exec))
     
    561577      // FIXME: this property (and the few below) probably shouldn't create a new object every
    562578      // time
    563       return new ImageConstructorImp(exec, m_frame->document());
     579      return new ImageConstructorImp(exec, impl()->frame()->document());
    564580    case Option:
    565581      if (!isSafeScript(exec))
    566582        return jsUndefined();
    567       return new JSHTMLOptionElementConstructor(exec, m_frame->document());
     583      return new JSHTMLOptionElementConstructor(exec, impl()->frame()->document());
    568584    case XMLHttpRequest:
    569585      if (!isSafeScript(exec))
    570586        return jsUndefined();
    571       return new JSXMLHttpRequestConstructorImp(exec, m_frame->document());
     587      return new JSXMLHttpRequestConstructorImp(exec, impl()->frame()->document());
    572588#if ENABLE(XSLT)
    573589    case XSLTProcessor_:
     
    582598      if (!isSafeScript(exec))
    583599        return jsUndefined();
    584       if (Document* doc = m_frame->document())
     600      if (Document* doc = impl()->frame()->document())
    585601        if (Element* fe = doc->ownerElement())
    586602          if (checkNodeSecurity(exec, fe))
     
    650666JSValue* Window::childFrameGetter(ExecState*, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
    651667{
    652     return retrieve(static_cast<Window*>(slot.slotBase())->m_frame->tree()->child(AtomicString(propertyName)));
     668    return retrieve(static_cast<Window*>(slot.slotBase())->impl()->frame()->tree()->child(AtomicString(propertyName)));
    653669}
    654670
    655671JSValue* Window::indexGetter(ExecState*, JSObject*, const Identifier&, const PropertySlot& slot)
    656672{
    657     return retrieve(static_cast<Window*>(slot.slotBase())->m_frame->tree()->child(slot.index()));
     673    return retrieve(static_cast<Window*>(slot.slotBase())->impl()->frame()->tree()->child(slot.index()));
    658674}
    659675
     
    661677{
    662678  Window *thisObj = static_cast<Window *>(slot.slotBase());
    663   Document *doc = thisObj->m_frame->document();
     679  Document *doc = thisObj->impl()->frame()->document();
    664680  ASSERT(thisObj->isSafeScript(exec) && doc && doc->isHTMLDocument());
    665681
     
    678694  // are in Moz but not IE. Since we have some of these, we have to do
    679695  // it the Moz way.
    680   if (frame()->tree()->child(propertyName)) {
     696  if (impl()->frame()->tree()->child(propertyName)) {
    681697    slot.setCustom(this, childFrameGetter);
    682698    return true;
     
    708724  bool ok;
    709725  unsigned i = propertyName.toArrayIndex(&ok);
    710   if (ok && i < m_frame->tree()->childCount()) {
     726  if (ok && i < impl()->frame()->tree()->childCount()) {
    711727    slot.setCustomIndex(this, i, indexGetter);
    712728    return true;
     
    714730
    715731  // allow shortcuts like 'Image1' instead of document.images.Image1
    716   Document *doc = m_frame->document();
     732  Document *doc = impl()->frame()->document();
    717733  if (isSafeScript(exec) && doc && doc->isHTMLDocument()) {
    718734    AtomicString atomicPropertyName = propertyName;
     
    741757    switch (entry->value) {
    742758    case Location_: {
    743       Frame* p = Window::retrieveActive(exec)->m_frame;
     759      Frame* p = Window::retrieveActive(exec)->impl()->frame();
    744760      if (p) {
    745761        DeprecatedString dstUrl = p->loader()->completeURL(DeprecatedString(value->toString(exec))).url();
     
    747763          bool userGesture = static_cast<ScriptInterpreter *>(exec->dynamicInterpreter())->wasRunByUserGesture();
    748764          // We want a new history item if this JS was called via a user gesture
    749           m_frame->loader()->scheduleLocationChange(dstUrl, p->loader()->outgoingReferrer(), !userGesture, userGesture);
     765          impl()->frame()->loader()->scheduleLocationChange(dstUrl, p->loader()->outgoingReferrer(), !userGesture, userGesture);
    750766        }
    751767      }
     
    858874  if (isSafeScript(exec))
    859875    JSObject::put(exec, propertyName, value, attr);
    860 }
    861 
    862 bool Window::toBoolean(ExecState *) const
    863 {
    864   return m_frame;
    865 }
    866 
    867 void Window::scheduleClose()
    868 {
    869   m_frame->scheduleClose();
    870876}
    871877
     
    932938bool Window::isSafeScript(ExecState *exec) const
    933939{
    934   if (!m_frame) // frame deleted ? can't grant access
     940  Frame* frame = impl()->frame();
     941  if (!frame) // frame deleted ? can't grant access
    935942    return false;
    936943  Frame* activeFrame = static_cast<ScriptInterpreter*>(exec->dynamicInterpreter())->frame();
    937944  if (!activeFrame)
    938945    return false;
    939   if (activeFrame == m_frame) // Not calling from another frame, no problem.
     946  if (activeFrame == frame) // Not calling from another frame, no problem.
    940947    return true;
    941948
     
    943950  // even if the document hasn't been constructed yet.  If the document doesn't
    944951  // exist yet allow JS to access the window object.
    945   if (!m_frame->document())
     952  if (!frame->document())
    946953      return true;
    947954
    948   WebCore::Document* thisDocument = m_frame->document();
     955  WebCore::Document* thisDocument = frame->document();
    949956  WebCore::Document* actDocument = activeFrame->document();
    950957
     
    966973  // or opener, allow access from any document in the same domain as
    967974  // the parent or opener.
    968   if (shouldLoadAsEmptyDocument(m_frame->loader()->url())) {
    969     Frame* ancestorFrame = m_frame->loader()->opener()
    970         ? m_frame->loader()->opener() : m_frame->tree()->parent();
     975  if (shouldLoadAsEmptyDocument(frame->loader()->url())) {
     976    Frame* ancestorFrame = impl()->frame()->loader()->opener()
     977        ? frame->loader()->opener() : frame->tree()->parent();
    971978    while (ancestorFrame && shouldLoadAsEmptyDocument(ancestorFrame->loader()->url()))
    972979      ancestorFrame = ancestorFrame->tree()->parent();
     
    985992  String message = String::format("Unsafe JavaScript attempt to access frame with URL %s from frame with URL %s. Domains must match.\n",
    986993                  thisDocument->URL().latin1(), actDocument->URL().latin1());
    987   if (Page* page = m_frame->page())
     994  if (Page* page = frame->page())
    988995      page->chrome()->addMessageToConsole(JSMessageSource, ErrorMessageLevel, message, 1, String());
    989996 
     
    9951002  if (!isSafeScript(exec))
    9961003    return;
    997   WebCore::Document *doc = m_frame->document();
     1004  Frame* frame = impl()->frame();
     1005  if (!frame)
     1006    return;
     1007  Document* doc = frame->document();
    9981008  if (!doc)
    9991009    return;
     
    10061016  if (!isSafeScript(exec))
    10071017    return jsUndefined();
    1008   WebCore::Document *doc = m_frame->document();
     1018  Frame* frame = impl()->frame();
     1019  if (!frame)
     1020    return jsUndefined();
     1021  Document* doc = frame->document();
    10091022  if (!doc)
    10101023    return jsUndefined();
     
    10831096  // Now recreate a working global object for the next URL that will use us; but only if we haven't been
    10841097  // disconnected yet
    1085   if (m_frame)
    1086     interpreter()->initGlobalObject();
     1098  if (Frame* frame = impl()->frame())
     1099    frame->scriptProxy()->interpreter()->initGlobalObject();
    10871100
    10881101  // there's likely to be lots of garbage now
     
    12501263    return throwError(exec, TypeError);
    12511264  Window *window = static_cast<Window *>(thisObj);
    1252   Frame *frame = window->m_frame;
     1265  Frame *frame = window->impl()->frame();
    12531266  if (!frame)
    12541267    return jsUndefined();
     
    13311344      if (frameName == "_top" || frameName == "_parent") {
    13321345          String completedURL;
    1333           Frame* activeFrame = Window::retrieveActive(exec)->m_frame;
     1346          Frame* activeFrame = Window::retrieveActive(exec)->impl()->frame();
    13341347          if (!urlString.isEmpty() && activeFrame)
    13351348              completedURL = activeFrame->document()->completeURL(urlString);
     
    15041517void Window::updateLayout() const
    15051518{
    1506   WebCore::Document* docimpl = m_frame->document();
     1519  Frame* frame = impl()->frame();
     1520  if (!frame)
     1521    return;
     1522  WebCore::Document* docimpl = frame->document();
    15071523  if (docimpl)
    15081524    docimpl->updateLayoutIgnorePendingStylesheets();
     
    15181534void ScheduledAction::execute(Window* window)
    15191535{
    1520     RefPtr<Frame> frame = window->m_frame;
     1536    RefPtr<Frame> frame = window->impl()->frame();
    15211537    if (!frame)
    15221538        return;
     
    16811697{
    16821698    clearAllTimeouts();
    1683     m_frame = 0;
    16841699    if (d->loc)
    16851700        d->loc->m_frame = 0;
     
    17931808    switch (entry->value) {
    17941809    case Href: {
    1795       Frame* p = Window::retrieveActive(exec)->frame();
     1810      Frame* p = Window::retrieveActive(exec)->impl()->frame();
    17961811      if ( p )
    17971812        url = p->loader()->completeURL(str).url();
     
    18431858
    18441859  const Window* window = Window::retrieveWindow(m_frame);
    1845   Frame* activeFrame = Window::retrieveActive(exec)->frame();
     1860  Frame* activeFrame = Window::retrieveActive(exec)->impl()->frame();
    18461861  if (!url.url().startsWith("javascript:", false) || (window && window->isSafeScript(exec))) {
    18471862    bool userGesture = static_cast<ScriptInterpreter *>(exec->dynamicInterpreter())->wasRunByUserGesture();
     
    18671882    {
    18681883      DeprecatedString str = args[0]->toString(exec);
    1869       Frame* p = Window::retrieveActive(exec)->frame();
     1884      Frame* p = Window::retrieveActive(exec)->impl()->frame();
    18701885      if ( p ) {
    18711886        const Window* window = Window::retrieveWindow(frame);
     
    18881903    case Location::Assign:
    18891904    {
    1890         Frame *p = Window::retrieveActive(exec)->frame();
     1905        Frame *p = Window::retrieveActive(exec)->impl()->frame();
    18911906        if (p) {
    18921907            const Window *window = Window::retrieveWindow(frame);
  • trunk/WebCore/bindings/js/kjs_window.h

    r24182 r24241  
    9191     */
    9292    static Window* retrieveActive(ExecState*);
    93     WebCore::Frame* frame() const { return m_frame; }
    9493    virtual void mark();
    9594    virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
    9695    JSValue *getValueProperty(ExecState *exec, int token) const;
    9796    virtual void put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr = None);
    98     virtual bool toBoolean(ExecState*) const;
    9997
    10098    int installTimeout(const UString& handler, int t, bool singleShot);
     
    107105   
    108106    KJS::ScriptInterpreter *interpreter() const;
    109 
    110     void scheduleClose();
    111107       
    112108    bool isSafeScript(ExecState*) const;
     
    191187    int installTimeout(ScheduledAction*, int interval, bool singleShot);
    192188
    193     WebCore::Frame* m_frame;
     189    RefPtr<WebCore::DOMWindow> m_impl;
    194190    OwnPtr<WindowPrivate> d;
    195191  };
  • trunk/WebCore/page/mac/WebCoreFrameBridge.mm

    r24222 r24241  
    3434#import "DOMImplementation.h"
    3535#import "DOMInternal.h"
     36#import "DOMWindow.h"
    3637#import "TextResourceDecoder.h"
    3738#import "DeleteSelectionCommand.h"
     
    143144    if (!window)
    144145        return;
    145        
    146     if (Document* doc = window->frame()->document())
    147         doc->updateRendering();
     146
     147    if (Frame* frame = window->impl()->frame())
     148        if (Document* doc = frame->document())
     149            doc->updateRendering();
    148150}
    149151
Note: See TracChangeset for help on using the changeset viewer.