| Summary: | WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||
| Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | benjamin, commit-queue, fpizlo, ggaren, keith_miller, mkwst, mmirman, msaboff, oliver, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Mark Lam
2015-06-10 22:04:27 PDT
Created attachment 254777 [details]
the patch.
Attachment 254777 [details] did not pass style-queue:
ERROR: Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:320: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5]
ERROR: Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm:324: Multi-line string ("...") found. This lint script doesn't do well with such strings, and may give bogus warnings. They're ugly and unnecessary, and you should use concatenation instead". [readability/multiline_string] [5]
Total errors found: 2 in 18 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 254777 [details] the patch. View in context: https://bugs.webkit.org/attachment.cgi?id=254777&action=review r=me > Source/JavaScriptCore/ChangeLog:7 > + Add to that m_lastException is providing the stack trace that VM::exceptionStackTrace() used to provide > Source/WebCore/bindings/js/JSDOMBinding.cpp:190 > exec->clearException(); > + exec->clearLastException(); Aren't these redundant with the same calls on lines 164 & 165? Comment on attachment 254777 [details] the patch. View in context: https://bugs.webkit.org/attachment.cgi?id=254777&action=review >> Source/JavaScriptCore/ChangeLog:7 >> + > > Add to that m_lastException is providing the stack trace that VM::exceptionStackTrace() used to provide Will do. >> Source/WebCore/bindings/js/JSDOMBinding.cpp:190 >> + exec->clearLastException(); > > Aren't these redundant with the same calls on lines 164 & 165? These aren’t redundant. They are needed in case the preceding toString() (called to make the errorMessage string) throws an exception. reportException() is not supposed to cause a new exception to be thrown. I will add a comment to document this. Thanks for the review. I also added more details in the JavaScriptCore ChangeLog on why we need VM::lastEcception(). Landed in r185487: <http://trac.webkit.org/r185487>. |