Changeset 76786 in webkit


Ignore:
Timestamp:
Jan 27, 2011 4:38:09 AM (13 years ago)
Author:
yurys@chromium.org
Message:

2011-01-27 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

[V8] Crash in WebCore::addMessageToConsole
https://bugs.webkit.org/show_bug.cgi?id=53227

  • bindings/v8/V8Proxy.cpp: check that the Frame where the error occured still has a page before getting a console object from it. (WebCore::V8Proxy::reportUnsafeAccessTo):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r76784 r76786  
     12011-01-27  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        [V8] Crash in WebCore::addMessageToConsole
     6        https://bugs.webkit.org/show_bug.cgi?id=53227
     7
     8        * bindings/v8/V8Proxy.cpp: check that the Frame where the error
     9        occured still has a page before getting a console object from it.
     10        (WebCore::V8Proxy::reportUnsafeAccessTo):
     11
    1122011-01-27  Hans Wennborg  <hans@chromium.org>
    213
  • trunk/Source/WebCore/bindings/v8/V8Proxy.cpp

    r76224 r76786  
    154154
    155155    Frame* source = V8Proxy::retrieveFrameForEnteredContext();
    156     if (!source || !source->document())
     156    if (!source)
     157        return;
     158    Page* page = source->page();
     159    if (!page)
     160        return;
     161
     162    Document* sourceDocument = source->document();
     163    if (!sourceDocument)
    157164        return; // Ignore error if the source document is gone.
    158 
    159     Document* sourceDocument = source->document();
    160165
    161166    // FIXME: This error message should contain more specifics of why the same
     
    171176    // it should be in the source page. Even for delayed messages, we put it in
    172177    // the source page.
    173     addMessageToConsole(source->page(), str, kSourceID, kLineNumber);
     178    addMessageToConsole(page, str, kSourceID, kLineNumber);
    174179}
    175180
Note: See TracChangeset for help on using the changeset viewer.