Changeset 51536 in webkit


Ignore:
Timestamp:
Dec 1, 2009 7:45:23 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-01 Mads Ager <ager@chromium.org>

Reviewed by Eric Seidel.

[V8] Don't crash in DOMWindow event getter in OOM situations
https://bugs.webkit.org/show_bug.cgi?id=32017

Add missing null handle checks in DOMWindow event property
accessors. V8Proxy::context(frame) can return a null handle in
OOM situations either if failing to initialize a context or if an
OOM is handled gracefully and javascript is disabled.

No new tests because we don't have a good way to test
out-of-memory bugs.

  • bindings/v8/custom/V8DOMWindowCustom.cpp: (WebCore::ACCESSOR_GETTER): (WebCore::ACCESSOR_SETTER):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r51535 r51536  
     12009-12-01  Mads Ager  <ager@chromium.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [V8] Don't crash in DOMWindow event getter in OOM situations
     6        https://bugs.webkit.org/show_bug.cgi?id=32017
     7
     8        Add missing null handle checks in DOMWindow event property
     9        accessors.  V8Proxy::context(frame) can return a null handle in
     10        OOM situations either if failing to initialize a context or if an
     11        OOM is handled gracefully and javascript is disabled.
     12
     13        No new tests because we don't have a good way to test
     14        out-of-memory bugs.
     15
     16        * bindings/v8/custom/V8DOMWindowCustom.cpp:
     17        (WebCore::ACCESSOR_GETTER):
     18        (WebCore::ACCESSOR_SETTER):
     19
    1202009-12-01  Chris Marrin  <cmarrin@apple.com>
    221
  • trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp

    r50607 r51536  
    176176
    177177    v8::Local<v8::Context> context = V8Proxy::context(frame);
     178    if (context.IsEmpty())
     179        return v8::Undefined();
     180
    178181    v8::Local<v8::String> eventSymbol = v8::String::NewSymbol("event");
    179182    v8::Handle<v8::Value> jsEvent = context->Global()->GetHiddenValue(eventSymbol);
     
    194197
    195198    v8::Local<v8::Context> context = V8Proxy::context(frame);
     199    if (context.IsEmpty())
     200        return;
     201
    196202    v8::Local<v8::String> eventSymbol = v8::String::NewSymbol("event");
    197203    context->Global()->SetHiddenValue(eventSymbol, value);
Note: See TracChangeset for help on using the changeset viewer.