Skip to content

Commit

Permalink
Bug 1490600 - Always use braces for if/for/while statements in js/xpc…
Browse files Browse the repository at this point in the history
…onnect/wrappers. r=bholley

Depends on D5655

Differential Revision: https://phabricator.services.mozilla.com/D5656

UltraBlame original commit: fa26c3594f36307988f575ce5520843427940733
  • Loading branch information
marco-c committed Oct 3, 2019
1 parent de0d569 commit a6a5ddf
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 0 deletions.
28 changes: 28 additions & 0 deletions js/xpconnect/wrappers/AccessCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,11 @@ if
!
propLength
)
{
return
false
;
}
char16_t
propChar0
=
Expand All @@ -588,6 +590,7 @@ type
=
CrossOriginLocation
)
{
return
dom
:
Expand All @@ -602,13 +605,15 @@ propChar0
set
)
;
}
if
(
type
=
=
CrossOriginWindow
)
{
return
dom
:
Expand All @@ -623,6 +628,7 @@ propChar0
set
)
;
}
return
false
;
Expand Down Expand Up @@ -840,9 +846,11 @@ Location
"
)
)
{
return
CrossOriginLocation
;
}
if
(
clasp
Expand Down Expand Up @@ -871,9 +879,11 @@ Window
"
)
)
{
return
CrossOriginWindow
;
}
return
CrossOriginOpaque
;
Expand Down Expand Up @@ -908,9 +918,11 @@ Wrapper
:
CALL
)
{
return
false
;
}
if
(
act
Expand All @@ -921,9 +933,11 @@ Wrapper
:
ENUMERATE
)
{
return
true
;
}
if
(
act
Expand Down Expand Up @@ -1008,10 +1022,12 @@ Wrapper
SET
)
)
{
return
true
;
}
}
if
(
type
Expand Down Expand Up @@ -1041,9 +1057,11 @@ Wrapper
:
GET
)
{
return
false
;
}
if
(
type
Expand Down Expand Up @@ -1131,9 +1149,11 @@ isObject
(
)
)
{
return
true
;
}
RootedObject
obj
(
Expand All @@ -1157,9 +1177,11 @@ IsWrapper
obj
)
)
{
return
true
;
}
if
(
mozilla
Expand Down Expand Up @@ -1216,9 +1238,11 @@ wrapperSubsumes
obj
)
)
{
return
true
;
}
JS_ReportErrorASCII
(
cx
Expand Down Expand Up @@ -1269,9 +1293,11 @@ thisv
)
)
)
{
return
false
;
}
for
(
size_t
Expand Down Expand Up @@ -1305,10 +1331,12 @@ i
]
)
)
{
return
false
;
}
}
return
true
;
Expand Down
4 changes: 4 additions & 0 deletions js/xpconnect/wrappers/AccessCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,16 @@ Wrapper
:
ENUMERATE
)
{
return
true
;
}
if
(
mayThrow
)
{
AccessCheck
:
:
Expand All @@ -598,6 +601,7 @@ access
)
)
;
}
return
false
;
Expand Down
4 changes: 4 additions & 0 deletions js/xpconnect/wrappers/ChromeObjectWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,11 @@ value
)
)
)
{
return
false
;
}
return
ChromeObjectWrapperBase
:
Expand Down Expand Up @@ -157,9 +159,11 @@ wrapper
v
)
)
{
return
false
;
}
return
ChromeObjectWrapperBase
:
Expand Down
Loading

0 comments on commit a6a5ddf

Please sign in to comment.