Closed
Bug 773667
Opened 12 years ago
Closed 12 years ago
Code clean up in ScreenshotLayer
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 17
People
(Reporter: gbrown, Assigned: gbrown)
Details
Attachments
(1 file, 2 obsolete files)
7.33 KB,
patch
|
blassey
:
review+
|
Details | Diff | Splinter Review |
There is some suspected-dead-code in ScreenshotLayer referencing createBitmap -- we should remove that if possible.
Assignee | ||
Comment 1•12 years ago
|
||
One call to createBitmap remains -- it is definitely called. This passes try: https://tbpl.mozilla.org/?tree=Try&rev=362ee3458cfc
Attachment #642562 -
Flags: review?(blassey.bugs)
Comment 2•12 years ago
|
||
Comment on attachment 642562 [details] [diff] [review] remove unused code in ScreenshotLayer Review of attachment 642562 [details] [diff] [review]: ----------------------------------------------------------------- clearing the review for these questions. Please re-request when you answer. ::: mobile/android/base/gfx/ScreenshotLayer.java @@ +52,5 @@ > mBufferSize = mImageSize; > mHasImage = true; > mImage.setBitmap(data, width, height, CairoImage.FORMAT_RGB16_565, rect); > } else { > + throw new RuntimeException("unexpected size in setBitmap: w="+width+" h="+height); where is this caught? I don't want to crash due to this. @@ +148,5 @@ > mFormat = format; > if (width == bitmap.getWidth() && height == bitmap.getHeight()) { > tmp = bitmap; > } else { > + throw new RuntimeException("unexpected size in setBitmap: w="+width+" h="+height); same question here
Attachment #642562 -
Flags: review?(blassey.bugs)
Assignee | ||
Comment 3•12 years ago
|
||
The exceptions in the previous patch were uncaught; in this patch, we log an error instead.
Attachment #642562 -
Attachment is obsolete: true
Attachment #644813 -
Flags: review?(blassey.bugs)
Comment 4•12 years ago
|
||
Comment on attachment 644813 [details] [diff] [review] remove unused code in ScreenshotLayer Review of attachment 644813 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/gfx/ScreenshotLayer.java @@ +42,5 @@ > mBufferSize = mImageSize; > mHasImage = true; > mImage.setBitmap(data, width, height, CairoImage.FORMAT_RGB16_565, rect); > } else { > + Log.e(LOGTAG, "### unexpected size in setBitmap: w="+width+" h="+height); I'd still like to throw here, I'd just like it to be declared and caught so we get a stack and still don't crash. @@ +142,2 @@ > } else { > + Log.e(LOGTAG, "### unexpected size in setBitmap: w="+width+" h="+height); same. Sorry if this wasn't clear before.
Attachment #644813 -
Flags: review?(blassey.bugs) → review-
Assignee | ||
Comment 5•12 years ago
|
||
Like this? I've gone back to throwing exceptions and added try/catch/Log to handle them.
Attachment #644813 -
Attachment is obsolete: true
Attachment #644963 -
Flags: review?(blassey.bugs)
Updated•12 years ago
|
Attachment #644963 -
Flags: review?(blassey.bugs) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4fb440488598
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4fb440488598
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 17
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•