WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190163
Create a RELEASE_AND_RETURN macro for ExceptionScopes
https://bugs.webkit.org/show_bug.cgi?id=190163
Summary
Create a RELEASE_AND_RETURN macro for ExceptionScopes
Keith Miller
Reported
2018-10-01 14:32:19 PDT
Create a RELEASE_AND_RETURN macro for ExceptionScopes
Attachments
Patch
(189.26 KB, patch)
2018-10-01 14:34 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Patch for landing
(197.93 KB, patch)
2018-10-01 15:44 PDT
,
Keith Miller
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Keith Miller
Comment 1
2018-10-01 14:34:34 PDT
Created
attachment 351300
[details]
Patch
Mark Lam
Comment 2
2018-10-01 14:44:19 PDT
Comment on
attachment 351300
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351300&action=review
r=me with unnecessary braces removed.
> Source/JavaScriptCore/dfg/DFGOperations.cpp:266 > if (prototype.isObject()) { > - scope.release(); > - return constructEmptyObject(exec, asObject(prototype)); > + RELEASE_AND_RETURN(scope, constructEmptyObject(exec, asObject(prototype))); > }
Don't need braces anymore. Ditto many places below.
> Source/JavaScriptCore/runtime/ExceptionScope.h:96 > +#define RELEASE_AND_RETURN(scope__, expression__) do { \
Pity that this name is so much more generic that RETURN_IF_EXCEPTION, but no one else has this idiom yet. So, I'm ok going with this until there's a need to rename it.
Keith Miller
Comment 3
2018-10-01 15:10:38 PDT
Comment on
attachment 351300
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=351300&action=review
>> Source/JavaScriptCore/dfg/DFGOperations.cpp:266 >> } > > Don't need braces anymore. Ditto many places below.
Weird that the linter didn't catch that :(
>> Source/JavaScriptCore/runtime/ExceptionScope.h:96 >> +#define RELEASE_AND_RETURN(scope__, expression__) do { \ > > Pity that this name is so much more generic that RETURN_IF_EXCEPTION, but no one else has this idiom yet. So, I'm ok going with this until there's a need to rename it.
How would you feel about RELEASE_SCOPE_AND_RETURN?
Mark Lam
Comment 4
2018-10-01 15:32:55 PDT
(In reply to Keith Miller from
comment #3
)
> How would you feel about RELEASE_SCOPE_AND_RETURN?
RELEASE_SCOPE_AND_RETURN is slightly less generic but also more verbose. I think we should just leave it as RELEASE_AND_RETURN for now. Don't fix it if it ain't broke.
Keith Miller
Comment 5
2018-10-01 15:44:12 PDT
Created
attachment 351317
[details]
Patch for landing
WebKit Commit Bot
Comment 6
2018-10-01 16:23:16 PDT
Comment on
attachment 351317
[details]
Patch for landing Clearing flags on attachment: 351317 Committed
r236697
: <
https://trac.webkit.org/changeset/236697
>
WebKit Commit Bot
Comment 7
2018-10-01 16:23:18 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2018-10-01 16:24:22 PDT
<
rdar://problem/44925105
>
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