Changeset 95667 in webkit


Ignore:
Timestamp:
Sep 21, 2011 1:13:57 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[Chromium] Protect the Frame in V8HTMLDocument::openCallback
https://bugs.webkit.org/show_bug.cgi?id=68555

Patch by Sergey Glazunov <serg.glazunov@gmail.com> on 2011-09-21
Reviewed by Nate Chapin.

Source/WebCore:

Test: fast/dom/frame-deleted-in-document-open.html

  • bindings/v8/custom/V8HTMLDocumentCustom.cpp:

(WebCore::V8HTMLDocument::openCallback):

LayoutTests:

  • fast/dom/frame-deleted-in-document-open-expected.txt: Added.
  • fast/dom/frame-deleted-in-document-open.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r95664 r95667  
     12011-09-21  Sergey Glazunov  <serg.glazunov@gmail.com>
     2
     3        [Chromium] Protect the Frame in V8HTMLDocument::openCallback
     4        https://bugs.webkit.org/show_bug.cgi?id=68555
     5
     6        Reviewed by Nate Chapin.
     7
     8        * fast/dom/frame-deleted-in-document-open-expected.txt: Added.
     9        * fast/dom/frame-deleted-in-document-open.html: Added.
     10
    1112011-09-21  Adam Klein  <adamk@chromium.org>
    212
  • trunk/Source/WebCore/ChangeLog

    r95664 r95667  
     12011-09-21  Sergey Glazunov  <serg.glazunov@gmail.com>
     2
     3        [Chromium] Protect the Frame in V8HTMLDocument::openCallback
     4        https://bugs.webkit.org/show_bug.cgi?id=68555
     5
     6        Reviewed by Nate Chapin.
     7
     8        Test: fast/dom/frame-deleted-in-document-open.html
     9
     10        * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
     11        (WebCore::V8HTMLDocument::openCallback):
     12
    1132011-09-21  Adam Klein  <adamk@chromium.org>
    214
  • trunk/Source/WebCore/bindings/v8/custom/V8HTMLDocumentCustom.cpp

    r65316 r95667  
    133133
    134134    if (args.Length() > 2) {
    135         if (Frame* frame = htmlDocument->frame()) {
     135        if (RefPtr<Frame> frame = htmlDocument->frame()) {
    136136            // Fetch the global object for the frame.
    137             v8::Local<v8::Context> context = V8Proxy::context(frame);
     137            v8::Local<v8::Context> context = V8Proxy::context(frame.get());
    138138            // Bail out if we cannot get the context.
    139139            if (context.IsEmpty())
     
    152152                params[i] = args[i];
    153153
    154             V8Proxy* proxy = V8Proxy::retrieve(frame);
    155             ASSERT(proxy);
     154            V8Proxy* proxy = V8Proxy::retrieve(frame.get());
     155            if (!proxy)
     156                return v8::Undefined();
    156157
    157158            v8::Local<v8::Value> result = proxy->callFunction(v8::Local<v8::Function>::Cast(function), global, args.Length(), params);
Note: See TracChangeset for help on using the changeset viewer.