Closed
Bug 1231627
Opened 9 years ago
Closed 8 years ago
[Static Analysis][Unchecked return value] In function WebGLContextLossHandler::RunTimer() from WebGLContextLossHandler.cpp
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
DUPLICATE
of bug 1280507
Tracking | Status | |
---|---|---|
firefox45 | --- | affected |
People
(Reporter: andi, Assigned: andi)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: CID 1327929)
Attachments
(1 file)
1.13 KB,
patch
|
Details | Diff | Splinter Review |
The Static Analysis tool Coverity added that return value from workerPrivate->AddFeature(workerPrivate->GetJSContext(), this) is not checked. >> if (!mFeatureAdded) { >> workerPrivate->AddFeature(workerPrivate->GetJSContext(), this); >> mFeatureAdded = true; >> } I've added these lines of code: >> if(NS_WARN_IF(!workerPrivate->AddFeature(workerPrivate->GetJSContext(), this))) >> return; >> else >> mFeatureAdded = true; That when AddFeature fails and it get called dirrectly from TimerCallback we should also be blocked by the assert and to signal a potential issue: >> if (mShouldRunTimerAgain) { >> RunTimer(); >> MOZ_ASSERT(mIsTimerRunning); >> } Now i'm not sure that we should have the return in the event AddFeature fails, but i put it there in order to signal that we no longer trigger a StartTimer.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8697229 -
Flags: review?(jmuizelaar)
Updated•8 years ago
|
Attachment #8697229 -
Flags: review?(jmuizelaar) → review?(jgilbert)
Comment 2•8 years ago
|
||
Duping this to bug 1280507, since that bug removes this code.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•8 years ago
|
Attachment #8697229 -
Flags: review?(jgilbert)
You need to log in
before you can comment on or make changes to this bug.
Description
•