Closed Bug 758670 Opened 12 years ago Closed 12 years ago

Use stdint types instead of stdin ones in dom

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Details

Attachments

(1 file)

Attached patch Patch v1Splinter Review
      No description provided.
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.
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+
https://hg.mozilla.org/mozilla-central/rev/f637cf042c82
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla16
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: