Last Comment Bug 758670 - Use stdint types instead of stdin ones in dom
: Use stdint types instead of stdin ones in dom
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla16
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-25 09:39 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-06-06 03:17 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (5.92 KB, patch)
2012-05-25 09:39 PDT, :Ms2ger (⌚ UTC+1/+2)
mounir: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-05-25 09:39:06 PDT
Created attachment 627256 [details] [diff] [review]
Patch v1
Comment 1 Mounir Lamouri (:mounir) 2012-05-26 14:57:45 PDT
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.
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-05-26 23:54:34 PDT
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 3 Mounir Lamouri (:mounir) 2012-05-29 04:02:55 PDT
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
Comment 4 :Ms2ger (⌚ UTC+1/+2) 2012-06-06 03:17:53 PDT
https://hg.mozilla.org/mozilla-central/rev/f637cf042c82

Note You need to log in before you can comment on or make changes to this bug.