Ignore:
Timestamp:
Mar 24, 2014, 8:27:46 PM (11 years ago)
Author:
[email protected]
Message:

Safari crashes in JavaScriptCore: JSC::JSObject::growOutOfLineStorage
when WebKit is compiled with fcatch-undefined-behavior
https://bugs.webkit.org/show_bug.cgi?id=130652

Reviewed by Mark Hahnenberg.

Use a static member function because the butterfly we pass in might be
NULL, and passing NULL to a member function is undefined behavior.

Stylistically, I think this new way reads a little more clearly, since it
matches createOrGrowArrayRight, and it helps to convey that m_butterfly
might not exist yet.

  • runtime/Butterfly.h:
  • runtime/ButterflyInlines.h:

(JSC::Butterfly::createOrGrowPropertyStorage): Renamed from growPropertyStorage
because we might create. Split out the create path to avoid using NULL
in a member function expression.

Removed some unused versions of this function.

  • runtime/JSObject.cpp:

(JSC::JSObject::growOutOfLineStorage): Updated for interface change.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r166216 r166217  
     12014-03-24  Geoffrey Garen  <[email protected]>
     2
     3        Safari crashes in JavaScriptCore: JSC::JSObject::growOutOfLineStorage
     4        when WebKit is compiled with fcatch-undefined-behavior
     5        https://bugs.webkit.org/show_bug.cgi?id=130652
     6
     7        Reviewed by Mark Hahnenberg.
     8
     9        Use a static member function because the butterfly we pass in might be
     10        NULL, and passing NULL to a member function is undefined behavior.
     11
     12        Stylistically, I think this new way reads a little more clearly, since it
     13        matches createOrGrowArrayRight, and it helps to convey that m_butterfly
     14        might not exist yet.
     15
     16        * runtime/Butterfly.h:
     17        * runtime/ButterflyInlines.h:
     18        (JSC::Butterfly::createOrGrowPropertyStorage): Renamed from growPropertyStorage
     19        because we might create. Split out the create path to avoid using NULL
     20        in a member function expression.
     21
     22        Removed some unused versions of this function.
     23
     24        * runtime/JSObject.cpp:
     25        (JSC::JSObject::growOutOfLineStorage): Updated for interface change.
     26
    1272014-03-24  Oliver Hunt  <[email protected]>
    228
Note: See TracChangeset for help on using the changeset viewer.