Changeset 238453 in webkit


Ignore:
Timestamp:
Nov 22, 2018 5:33:40 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

Make the jsc shell's dumpException() more robust against long exception strings.
https://bugs.webkit.org/show_bug.cgi?id=191910
<rdar://problem/46212980>

Reviewed by Michael Saboff.

This only affects the dumping of the exception string in the jsc shell due to
unhandled exceptions or exceptions at shell boot time before any JS code is
running.

  • jsc.cpp:

(dumpException):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r238439 r238453  
     12018-11-22  Mark Lam  <mark.lam@apple.com>
     2
     3        Make the jsc shell's dumpException() more robust against long exception strings.
     4        https://bugs.webkit.org/show_bug.cgi?id=191910
     5        <rdar://problem/46212980>
     6
     7        Reviewed by Michael Saboff.
     8
     9        This only affects the dumping of the exception string in the jsc shell due to
     10        unhandled exceptions or exceptions at shell boot time before any JS code is
     11        running.
     12
     13        * jsc.cpp:
     14        (dumpException):
     15
    1162018-11-21  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
    217
  • trunk/Source/JavaScriptCore/jsc.cpp

    r238391 r238453  
    23032303    } while (false)
    23042304
    2305     printf("Exception: %s\n", exception.toWTFString(globalObject->globalExec()).utf8().data());
     2305    auto exceptionString = exception.toWTFString(globalObject->globalExec());
     2306    Expected<CString, UTF8ConversionError> expectedCString = exceptionString.tryGetUtf8();
     2307    if (expectedCString)
     2308        printf("Exception: %s\n", expectedCString.value().data());
     2309    else
     2310        printf("Exception: <out of memory while extracting exception string>\n");
    23062311
    23072312    Identifier nameID = Identifier::fromString(globalObject->globalExec(), "name");
Note: See TracChangeset for help on using the changeset viewer.