Changeset 147149 in webkit


Ignore:
Timestamp:
Mar 28, 2013 1:08:36 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

exceptions are not checked after toInt32 calls in bindings.
https://bugs.webkit.org/show_bug.cgi?id=113218

Patch by Arnaud Renevier <a.renevier@sisa.samsung.com> on 2013-03-28
Reviewed by Kentaro Hara.

Source/WebCore:

In attribute setter, wrap JSValue to native value conversion in a try
catch block.

Define a new macro binding: V8TRYCATCH_VOID

No new tests: covered by fast/dom/exception-in-binding.html

  • bindings/scripts/CodeGeneratorV8.pm:

(GenerateNormalAttrSetter):

  • bindings/v8/V8BindingMacros.h:

(WebCore):

LayoutTests:

  • platform/chromium/TestExpectations: Enable fast/dom/exception-in-binding.html
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147148 r147149  
     12013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
     2
     3        exceptions are not checked after toInt32 calls in bindings.
     4        https://bugs.webkit.org/show_bug.cgi?id=113218
     5
     6        Reviewed by Kentaro Hara.
     7
     8        * platform/chromium/TestExpectations: Enable fast/dom/exception-in-binding.html
     9
    1102013-03-28  Roger Fong  <roger_fong@apple.com>
    211
  • trunk/LayoutTests/platform/chromium/TestExpectations

    r147123 r147149  
    38013801webkit.org/b/113114 media/video-controls-captions.html [ Timeout ]
    38023802
    3803 webkit.org/b/113219 fast/dom/exception-in-binding.html [ Failure ]
    3804 
    38053803webkit.org/b/113474 http/tests/cache/subresource-failover-to-network.html [ Pass Failure ]
    38063804
  • trunk/Source/WebCore/ChangeLog

    r147145 r147149  
     12013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
     2
     3        exceptions are not checked after toInt32 calls in bindings.
     4        https://bugs.webkit.org/show_bug.cgi?id=113218
     5
     6        Reviewed by Kentaro Hara.
     7
     8        In attribute setter, wrap JSValue to native value conversion in a try
     9        catch block.
     10
     11        Define a new macro binding: V8TRYCATCH_VOID
     12
     13        No new tests: covered by fast/dom/exception-in-binding.html
     14
     15        * bindings/scripts/CodeGeneratorV8.pm:
     16        (GenerateNormalAttrSetter):
     17        * bindings/v8/V8BindingMacros.h:
     18        (WebCore):
     19
    1202013-03-28  ChangSeok Oh  <changseok.oh@collabora.com>
    221
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

    r147041 r147149  
    13991399            push(@implContentInternals, "    V8TRYCATCH_WITH_TYPECHECK_VOID($nativeType, v, $value, info.GetIsolate());\n");
    14001400        } else {
    1401             push(@implContentInternals, "    $nativeType v = $value;\n");
     1401            push(@implContentInternals, "    V8TRYCATCH_VOID($nativeType, v, $value);\n");
    14021402        }
    14031403    }
  • trunk/Source/WebCore/bindings/v8/V8BindingMacros.h

    r145929 r147149  
    4141        if (block.HasCaught())            \
    4242            return block.ReThrow();       \
     43    }
     44
     45#define V8TRYCATCH_VOID(type, var, value) \
     46    type var;                             \
     47    {                                     \
     48        v8::TryCatch block;               \
     49        var = (value);                    \
     50        if (block.HasCaught()) {          \
     51            block.ReThrow();              \
     52            return;                       \
     53        }                                 \
    4354    }
    4455
Note: See TracChangeset for help on using the changeset viewer.