File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed
javascript/ql/lib/semmle/javascript/dataflow/internal Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -520,23 +520,23 @@ private module CachedSteps {
520520 predicate receiverPropWrite ( Function f , string prop , DataFlow:: Node rhs ) {
521521 DataFlow:: thisNode ( f ) .hasPropertyWrite ( prop , rhs )
522522 }
523+
524+ /**
525+ * Holds if there is a step from `pred` to `succ` through a call to an identity function.
526+ */
527+ overlay [ local]
528+ cached
529+ predicate identityFunctionStep ( DataFlow:: Node pred , DataFlow:: CallNode succ ) {
530+ exists ( DataFlow:: GlobalVarRefNode global |
531+ global .getName ( ) = "Object" and
532+ succ .( DataFlow:: MethodCallNode ) .calls ( global , [ "freeze" , "seal" ] ) and
533+ pred = succ .getArgument ( 0 )
534+ )
535+ }
523536}
524537
525538import CachedSteps
526539
527- /**
528- * Holds if there is a step from `pred` to `succ` through a call to an identity function.
529- */
530- overlay [ local]
531- cached
532- predicate identityFunctionStep ( DataFlow:: Node pred , DataFlow:: CallNode succ ) {
533- exists ( DataFlow:: GlobalVarRefNode global |
534- global .getName ( ) = "Object" and
535- succ .( DataFlow:: MethodCallNode ) .calls ( global , [ "freeze" , "seal" ] ) and
536- pred = succ .getArgument ( 0 )
537- )
538- }
539-
540540/**
541541 * A utility class that is equivalent to `boolean` but does not require type joining.
542542 */
You can’t perform that action at this time.
0 commit comments