Use stdint types instead of stdin ones in dom

RESOLVED FIXED in mozilla16

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla16
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 627256 [details] [diff] [review]
Patch v1
Attachment #627256 - Flags: review?(mounir)
Comment on attachment 627256 [details] [diff] [review]
Patch v1

Review of attachment 627256 [details] [diff] [review]:
-----------------------------------------------------------------

Do we have a policy regarding this? Shouldn't we use NSPR types instead when possible?
The patch seems ok assuming we want it.
(Assignee)

Comment 2

5 years ago
The JSAPI uses stdint types, and the PR* ones may or may not be typedef'd to something close enough not to break, say, BSD.
Comment on attachment 627256 [details] [diff] [review]
Patch v1

Review of attachment 627256 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the comments applied.

::: content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ +4035,5 @@
>              if (!checkedDirtyX.isValid())
>                  return NS_ERROR_DOM_INDEX_SIZE_ERR;
>  
>              dirtyX = checkedDirtyX.value();
> +            dirtyWidth = -int32_t(dirtyWidth);

Why not simply |dirtyWidth = -dirtyWidth;|?

@@ +4047,5 @@
>              if (!checkedDirtyY.isValid())
>                  return NS_ERROR_DOM_INDEX_SIZE_ERR;
>  
>              dirtyY = checkedDirtyY.value();
> +            dirtyHeight = -int32_t(dirtyHeight);

ditto

::: content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
@@ +4205,5 @@
>        if (!checkedDirtyX.isValid())
>            return NS_ERROR_DOM_INDEX_SIZE_ERR;
>  
>        dirtyX = checkedDirtyX.value();
> +      dirtyWidth = -int32_t(dirtyWidth);

ditto

@@ +4217,5 @@
>        if (!checkedDirtyY.isValid())
>            return NS_ERROR_DOM_INDEX_SIZE_ERR;
>  
>        dirtyY = checkedDirtyY.value();
> +      dirtyHeight = -int32_t(dirtyHeight);

ditto
Attachment #627256 - Flags: review?(mounir) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/f637cf042c82
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
You need to log in before you can comment on or make changes to this bug.