WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
165022
Fix exception scope verification failures in runtime/JSGenericTypedArrayView* files.
https://bugs.webkit.org/show_bug.cgi?id=165022
Summary
Fix exception scope verification failures in runtime/JSGenericTypedArrayView*...
Mark Lam
Reported
2016-11-21 20:00:52 PST
Patch coming.
Attachments
proposed patch.
(11.68 KB, patch)
2016-11-21 20:05 PST
,
Mark Lam
saam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Lam
Comment 1
2016-11-21 20:05:47 PST
Created
attachment 295324
[details]
proposed patch.
Saam Barati
Comment 2
2016-11-28 14:18:34 PST
Comment on
attachment 295324
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=295324&action=review
> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:470 > + scope.release();
Why not put the scope.release() before the switch and also keep the old return statement?
Mark Lam
Comment 3
2016-11-28 15:27:24 PST
Comment on
attachment 295324
[details]
proposed patch. View in context:
https://bugs.webkit.org/attachment.cgi?id=295324&action=review
>> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:470 >> + scope.release(); > > Why not put the scope.release() before the switch and also keep the old return statement?
Because we want the scope.release() near the return statement. Having it before the switch increases the opportunity for new code to be inadvertantly added between the scope.release() and the switch.
Mark Lam
Comment 4
2016-11-28 15:35:17 PST
(In reply to
comment #3
)
> Comment on
attachment 295324
[details]
> proposed patch. > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=295324&action=review
> > >> Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:470 > >> + scope.release(); > > > > Why not put the scope.release() before the switch and also keep the old return statement? > > Because we want the scope.release() near the return statement. Having it > before the switch increases the opportunity for new code to be inadvertantly > added between the scope.release() and the switch.
Saam pointed out to me offline that if we have 2 ThrowScopes between the scope.release() and the return, the 2nd ThrowScope will catch the unhandled exception from the first. So, my reasoning above does not apply. Anyway, I'll leave it as is for this patch because it does make it easier to see the return that corresponds to the scope.release().
Mark Lam
Comment 5
2016-11-28 15:36:08 PST
Thanks for the review. Landed in
r209031
: <
http://trac.webkit.org/r209031
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug