WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
122802
Don't generate a wasteful isObservable check in isReachableFromOpaqueRoots
https://bugs.webkit.org/show_bug.cgi?id=122802
Summary
Don't generate a wasteful isObservable check in isReachableFromOpaqueRoots
Alexey Proskuryakov
Reported
2013-10-14 18:09:31 PDT
Like here: bool JSTestObjOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) { JSTestObj* jsTestObj = jsCast<JSTestObj*>(handle.get().asCell()); if (!isObservable(jsTestObj)) return false; UNUSED_PARAM(visitor); return false; }
Attachments
proposed patch
(14.76 KB, patch)
2013-10-14 18:16 PDT
,
Alexey Proskuryakov
mhahnenberg
: review+
Details
Formatted Diff
Diff
a little better
(15.15 KB, patch)
2013-10-14 18:22 PDT
,
Alexey Proskuryakov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2013-10-14 18:16:08 PDT
Created
attachment 214214
[details]
proposed patch The added UNUSED_PARAM is not always accurate, but neither was an existing one.
Mark Hahnenberg
Comment 2
2013-10-14 18:18:59 PDT
Comment on
attachment 214214
[details]
proposed patch r=me
Alexey Proskuryakov
Comment 3
2013-10-14 18:22:00 PDT
Created
attachment 214215
[details]
a little better Actually, can do a little better.
Mark Hahnenberg
Comment 4
2013-10-14 18:28:07 PDT
Comment on
attachment 214215
[details]
a little better View in context:
https://bugs.webkit.org/attachment.cgi?id=214215&action=review
r=me
> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2575 > + push(@implContent, " JS${interfaceName}* js${interfaceName} = jsCast<JS${interfaceName}*>(handle.get().asCell());\n"); > + $emittedJSCast = 1;
Might want to check if (!$emittedJSCast) for future people to pick up on the pattern if they add something. Up to you though.
Alexey Proskuryakov
Comment 5
2013-10-14 19:22:15 PDT
Comment on
attachment 214215
[details]
a little better View in context:
https://bugs.webkit.org/attachment.cgi?id=214215&action=review
>> Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:2575 >> + $emittedJSCast = 1; > > Might want to check if (!$emittedJSCast) for future people to pick up on the pattern if they add something. Up to you though.
Yeah, I also had this thought cross my mind... I think that adding an unnecessary check would be confusing, and that does not overweigh the benefit of easier copy/pasting.
WebKit Commit Bot
Comment 6
2013-10-14 19:46:04 PDT
Comment on
attachment 214215
[details]
a little better Clearing flags on attachment: 214215 Committed
r157438
: <
http://trac.webkit.org/changeset/157438
>
WebKit Commit Bot
Comment 7
2013-10-14 19:46:07 PDT
All reviewed patches have been landed. Closing bug.
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