WebKit Bugzilla
Attachment 361894 Details for
Bug 194581
: Remove unnecessary null check in bindings.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch.
bug-194581.patch (text/plain), 2.40 KB, created by
Mark Lam
on 2019-02-12 22:12:27 PST
(
hide
)
Description:
proposed patch.
Filename:
MIME Type:
Creator:
Mark Lam
Created:
2019-02-12 22:12:27 PST
Size:
2.40 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 241339) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,20 @@ >+2019-02-12 Mark Lam <mark.lam@apple.com> >+ >+ Remove unnecessary null check in bindings. >+ https://bugs.webkit.org/show_bug.cgi?id=194581 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ It is always safe to call visitor.containsOpaqueRoot(root) with a null root pointer. >+ It will just return false. Since we don't expect the root pointer to be null in >+ the common case, having a null check here is also not optimal. We'll remove this >+ unneeded null check. >+ >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateImplementation): >+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: >+ (WebCore::JSTestGenerateIsReachableOwner::isReachableFromOpaqueRoots): >+ > 2019-02-12 Rob Buis <rbuis@igalia.com> > > Align with Fetch on data: URLs >Index: Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >=================================================================== >--- Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (revision 241316) >+++ Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (working copy) >@@ -4679,7 +4679,7 @@ sub GenerateImplementation > } > > push(@implContent, $rootString); >- push(@implContent, " return root && visitor.containsOpaqueRoot(root);\n"); >+ push(@implContent, " return visitor.containsOpaqueRoot(root);\n"); > } else { > if (!$emittedJSCast) { > push(@implContent, " UNUSED_PARAM(handle);\n"); >Index: Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp >=================================================================== >--- Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (revision 241316) >+++ Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp (working copy) >@@ -204,7 +204,7 @@ bool JSTestGenerateIsReachableOwner::isR > TestGenerateIsReachable* root = &jsTestGenerateIsReachable->wrapped(); > if (UNLIKELY(reason)) > *reason = "Reachable from TestGenerateIsReachable"; >- return root && visitor.containsOpaqueRoot(root); >+ return visitor.containsOpaqueRoot(root); > } > > void JSTestGenerateIsReachableOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194581
:
361893
| 361894