Changeset 49047 in webkit


Ignore:
Timestamp:
Oct 2, 2009 3:15:23 PM (15 years ago)
Author:
eric@webkit.org
Message:

2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>

Reviewed by Dimitri Glazkov.

Test that having infinite recursion in XMLHttpRequest event handler does not crash.
https://bugs.webkit.org/show_bug.cgi?id=29974

  • fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Added.
  • fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html: Added.

2009-10-02 Vitaly Repeshko <vitalyr@chromium.org>

Reviewed by Dimitri Glazkov.

[V8] Recursion guard for V8Proxy::callFunction.
Fixes http://crbug.com/23278.
https://bugs.webkit.org/show_bug.cgi?id=29974

Test: fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html

  • bindings/v8/V8Proxy.cpp: (WebCore::V8Proxy::callFunction):
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r49045 r49047  
     12009-10-02  Vitaly Repeshko  <vitalyr@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Test that having infinite recursion in XMLHttpRequest event handler does not crash.
     6        https://bugs.webkit.org/show_bug.cgi?id=29974
     7
     8        * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event-expected.txt: Added.
     9        * fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html: Added.
     10
    1112009-10-02  Victor Wang  <victorw@chromium.org>
    212
  • trunk/WebCore/ChangeLog

    r49046 r49047  
     12009-10-02  Vitaly Repeshko  <vitalyr@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        [V8] Recursion guard for V8Proxy::callFunction.
     6        Fixes http://crbug.com/23278.
     7        https://bugs.webkit.org/show_bug.cgi?id=29974
     8
     9        Test: fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html
     10
     11        * bindings/v8/V8Proxy.cpp:
     12        (WebCore::V8Proxy::callFunction):
     13
    1142009-10-02  Brian Weinstein  <bweinstein@apple.com>
    215
  • trunk/WebCore/bindings/v8/V8Proxy.cpp

    r48978 r49047  
    417417    {
    418418        V8ConsoleMessage::Scope scope;
     419
     420        if (m_recursion >= kMaxRecursionDepth) {
     421            v8::Local<v8::String> code = v8::String::New("throw new RangeError('Maximum call stack size exceeded.')");
     422            if (code.IsEmpty())
     423                return result;
     424            v8::Local<v8::Script> script = v8::Script::Compile(code);
     425            if (script.IsEmpty())
     426                return result;
     427            script->Run();
     428            return result;
     429        }
    419430
    420431        // Evaluating the JavaScript could cause the frame to be deallocated,
Note: See TracChangeset for help on using the changeset viewer.