Changeset 68890 in webkit


Ignore:
Timestamp:
Oct 1, 2010 7:56:18 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2010-10-01 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>

Reviewed by Andreas Kling.

[Qt] Stack overflow on symbian platform.
https://bugs.webkit.org/show_bug.cgi?id=40598

Move big allocation in arrayProtoFuncToString from stack to heap.
JSC::arrayProtoFuncToString function can be called recursivly and
1K allocation on stack cahse stack overflow.
Can be useful for other platforms with limited stack size.

  • runtime/ArrayPrototype.cpp: (JSC::arrayProtoFuncToString):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r68832 r68890  
     12010-10-01  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] Stack overflow on symbian platform.
     6        https://bugs.webkit.org/show_bug.cgi?id=40598
     7       
     8        Move big allocation in arrayProtoFuncToString from stack to heap.
     9        JSC::arrayProtoFuncToString function can be called recursivly and
     10        1K allocation on stack cahse stack overflow.
     11        Can be useful for other platforms with limited stack size.
     12
     13        * runtime/ArrayPrototype.cpp:
     14        (JSC::arrayProtoFuncToString):
     15
    1162010-09-30  Kwang Yul Seo  <skyul@company100.net>
    217
  • trunk/JavaScriptCore/runtime/ArrayPrototype.cpp

    r66318 r68890  
    181181    unsigned length = thisObj->get(exec, exec->propertyNames().length).toUInt32(exec);
    182182    unsigned totalSize = length ? length - 1 : 0;
     183#if OS(SYMBIAN)
     184    // Symbian has very limited stack size available.
     185    // This function could be called recursively and allocating 1K on stack here cause
     186    // stack overflow on Symbian devices.
     187    Vector<RefPtr<StringImpl> > strBuffer(length);
     188#else
    183189    Vector<RefPtr<StringImpl>, 256> strBuffer(length);
     190#endif   
    184191    for (unsigned k = 0; k < length; k++) {
    185192        JSValue element;
Note: See TracChangeset for help on using the changeset viewer.