Bug 189268 - Make the jsc shell print, printErr, and debug functions more robust.
Summary: Make the jsc shell print, printErr, and debug functions more robust.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-04 12:07 PDT by Mark Lam
Modified: 2018-09-04 12:50 PDT (History)
5 users (show)

See Also:


Attachments
proposed patch. (3.34 KB, patch)
2018-09-04 12:11 PDT, Mark Lam
keith_miller: review+
mark.lam: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2018-09-04 12:07:27 PDT
We'll now check for UTF8 conversion errors.

<rdar://problem/41192690>
Comment 1 Mark Lam 2018-09-04 12:11:13 PDT
Created attachment 348836 [details]
proposed patch.
Comment 2 Mark Lam 2018-09-04 12:13:16 PDT
Comment on attachment 348836 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=348836&action=review

> Source/JavaScriptCore/jsc.cpp:1030
> +        scope.throwException(exec, createError(exec, "Source exhausted encountered during UTF8 conversion"));

I should remove the "encountered" here.
Comment 3 Keith Miller 2018-09-04 12:20:07 PDT
Comment on attachment 348836 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=348836&action=review

r=me.

>> Source/JavaScriptCore/jsc.cpp:1030
>> +        scope.throwException(exec, createError(exec, "Source exhausted encountered during UTF8 conversion"));
> 
> I should remove the "encountered" here.

What does SourceExhausted error actually mean anyway?
Comment 4 Mark Lam 2018-09-04 12:46:55 PDT
(In reply to Keith Miller from comment #3)
> What does SourceExhausted error actually mean anyway?

From convertUTF8ToUTF16() in UTF8.cpp, I think it means that a multi-byte encoding got cut off (i.e. missing bytes).
Comment 5 Mark Lam 2018-09-04 12:49:10 PDT
Thanks for the review.  Landed in r235627: <http://trac.webkit.org/r235627>.